1
0
mirror of https://github.com/TwiN/gatus.git synced 2026-02-04 15:14:43 +00:00

Ignore "unexpected end of JSON input" errors

This commit is contained in:
TwinProduction
2020-10-15 22:43:24 -04:00
parent 8fd6eddc16
commit a66cfc094a

View File

@@ -138,7 +138,9 @@ func sanitizeAndResolve(list []string, result *Result) []string {
}
resolvedElement, resolvedElementLength, err := jsonpath.Eval(strings.Replace(element, fmt.Sprintf("%s.", BodyPlaceHolder), "", 1), result.Body)
if err != nil {
result.Errors = append(result.Errors, err.Error())
if err.Error() != "unexpected end of JSON input" {
result.Errors = append(result.Errors, err.Error())
}
element = fmt.Sprintf("%s %s", element, InvalidConditionElementSuffix)
} else {
if wantLength {