-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log non actionable errors on WARN level #628
Conversation
Codecov ReportBase: 15.67% // Head: 15.68% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #628 +/- ##
=======================================
Coverage 15.67% 15.68%
=======================================
Files 15 15
Lines 5231 5229 -2
=======================================
Hits 820 820
+ Misses 4368 4366 -2
Partials 43 43
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | ||
defer func() { | ||
if x := recover(); x != nil { | ||
p.API.LogError("Recovered from a panic", | ||
p.API.LogWarn("Recovered from a panic", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious about this strategy in general. Do we do this in other plugins? Should we do this in all plugins?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you referring to the recover
handler? Yes, that is a pattern that all plugins should follow. Currently, only a handful do that.
/update-branch |
Summary
Ticket Link
Fixes #627