Skip to content

Commit

Permalink
set verification error if failed to decode body (#3560)
Browse files Browse the repository at this point in the history
  • Loading branch information
kashifkhan0771 authored Nov 5, 2024
1 parent 5ca4a17 commit 3f8ddd3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/detectors/opsgenie/opsgenie.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 3f8ddd3

Please # to comment.