diff --git a/pkg/exprhelpers/jsonextract.go b/pkg/exprhelpers/jsonextract.go index 8c60a50bda2..125dd217685 100644 --- a/pkg/exprhelpers/jsonextract.go +++ b/pkg/exprhelpers/jsonextract.go @@ -13,7 +13,12 @@ func JsonExtractLib(jsblob string, target ...string) string { jsonparser.StringToBytes(jsblob), target..., ) + if err != nil { + if err == jsonparser.KeyPathNotFoundError { + log.Debugf("%+v doesn't exist", target) + return "" + } log.Errorf("jsonExtractLib : %+v : %s", target, err) return "" } @@ -22,7 +27,6 @@ func JsonExtractLib(jsblob string, target ...string) string { return "" } strvalue := string(value) - //debug stuff return strvalue }