mirror of
https://github.com/TwiN/gatus.git
synced 2024-12-15 17:51:09 +00:00
Ignore "unexpected end of JSON input" errors
This commit is contained in:
parent
8fd6eddc16
commit
a66cfc094a
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
resolvedElement, resolvedElementLength, err := jsonpath.Eval(strings.Replace(element, fmt.Sprintf("%s.", BodyPlaceHolder), "", 1), result.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if err.Error() != "unexpected end of JSON input" {
|
||||||
result.Errors = append(result.Errors, err.Error())
|
result.Errors = append(result.Errors, err.Error())
|
||||||
|
}
|
||||||
element = fmt.Sprintf("%s %s", element, InvalidConditionElementSuffix)
|
element = fmt.Sprintf("%s %s", element, InvalidConditionElementSuffix)
|
||||||
} else {
|
} else {
|
||||||
if wantLength {
|
if wantLength {
|
||||||
|
|
Loading…
Reference in a new issue