Skip to content

Commit

Permalink
enhance: Log appsec error on writing response to remediation (crowdse…
Browse files Browse the repository at this point in the history
…curity#3412)

* enhance: Log appsec error on writing response to remediation

* fix: note to self dont write code at midnight
  • Loading branch information
LaurenceJJones authored Jan 18, 2025
1 parent 49fb24c commit 7d12b80
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/acquisition/modules/appsec/appsec.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,8 @@ func (w *AppsecSource) appsecHandler(rw http.ResponseWriter, r *http.Request) {
logger.Errorf("unable to serialize response: %s", err)
rw.WriteHeader(http.StatusInternalServerError)
} else {
rw.Write(body)
if _, err := rw.Write(body); err != nil {
logger.Errorf("unable to write response: %s", err)
}
}
}

0 comments on commit 7d12b80

Please sign in to comment.