Unmarshal Json (#2414)

Log the actual line that caused an error to help debugging
This commit is contained in:
Laurence Jones 2023-08-09 09:42:08 +01:00 committed by GitHub
parent 0f319b31fd
commit 93c22f29cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -174,7 +174,7 @@ func UnmarshalJSON(params ...any) (any, error) {
err := json.Unmarshal([]byte(jsonBlob), &out)
if err != nil {
log.Errorf("UnmarshalJSON : %s", err)
log.WithField("line", jsonBlob).Errorf("UnmarshalJSON : %s", err)
return nil, err
}
target[key] = out