mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-21 07:37:38 +08:00
Truncate long responses
This commit is contained in:
@@ -444,6 +444,7 @@ async function evaluateJsonQuery(data, jsonPath, jsonPathOperator, expectedValue
|
||||
};
|
||||
}
|
||||
catch (err) {
|
||||
response = (response.toString().length > 50) ? `${response.substring(0, 50)}… (truncated)` : response.toString();
|
||||
throw new Error(`Error evaluating JSON query: ${err.message}. Response from server was: ${response}`);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user