You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to correlate custom ErrorHandler logging with requests if would be very helpful if the ErrorHandler signature was expanded to include context.Context e.g.
typeErrorHandlerfunc(ctx context.Context, w http.ResponseWriter, messagestring, statusCodeint)
This however is a breaking change so another option could be to expand Options with a ErrorHandlerWithContext field.
The text was updated successfully, but these errors were encountered:
There is definitely a need for more info in the error handler.
Context is one such need, but the current matched Route, the Request, and the Request's Headers — like Accept — are others.
I created a PR (#15) that (I think) addresses @pebo's use-case in this issue but also addresses others, and in a manner that will allow adding other info if such info is found to be needed by others in the future. Hopefully PR #15 can supersede PRs #13 and #14 since they change error handling but don't address the use-cases that #15 address.
In order to correlate custom ErrorHandler logging with requests if would be very helpful if the ErrorHandler signature was expanded to include
context.Context
e.g.This however is a breaking change so another option could be to expand
Options
with aErrorHandlerWithContext
field.The text was updated successfully, but these errors were encountered: