Closed dwisiswant0 closed 1 year ago
Attention: 2 lines
in your changes are missing coverage. Please review.
Comparison is base (
209249e
) 75.67% compared to head (ec176de
) 76.81%. Report is 3 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
IMPORTANT: Please do not create a PR without creating an issue first!
(Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of the pull request).
Summary
The previous code in the
sendFalcoEvents()
function attempted to defer the closing of the response body w/o checking if the HTTP request had resulted in an error. This could lead to a "nil pointer dereference" error when an error occurred during the request.This commit fixes the issue by checking if an error occurred and deferring the response body close only if there was no error.
Proposed of changes
This PR fixes/implements the following bugs/features:
How has this been tested?
Fill the
FalcoSidekickURL
option field with an unreachable host.Proof:
Closing issues
Fixes #
Checklist:
make lint
).