From 3f8ddd39a2799df8ec4cb1404f36650e4c3f0c71 Mon Sep 17 00:00:00 2001 From: Kashif Khan <70996046+kashifkhan0771@users.noreply.github.com> Date: Tue, 5 Nov 2024 21:00:54 +0500 Subject: [PATCH] set verification error if failed to decode body (#3560) --- pkg/detectors/opsgenie/opsgenie.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/detectors/opsgenie/opsgenie.go b/pkg/detectors/opsgenie/opsgenie.go index 4b29ee7538e5..580cc8426759 100644 --- a/pkg/detectors/opsgenie/opsgenie.go +++ b/pkg/detectors/opsgenie/opsgenie.go @@ -81,6 +81,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result err := json.NewDecoder(res.Body).Decode(&data) if err != nil { s1.Verified = false + // set verification error in result if failed to decode the body of response + s1.SetVerificationError(err, resMatch) continue }