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
I'd like to use your middleware but noticed that it does not correctly handle wrapped errors. I opened a PR which adds a test case showing the behaviour #1.
I have not yet looked into why this happens. Before I tried your middleware, I used errors.Is to manually map custom errors onto http status codes. Generally the usage of errors.Is seems to be the right choice.
The text was updated successfully, but these errors were encountered:
@fabiante Thank you very much for your issue. I think the reason is that only the first parameter of errors.is was Unwrap. Some comments were added to the PR.
Hi there!
I'd like to use your middleware but noticed that it does not correctly handle wrapped errors. I opened a PR which adds a test case showing the behaviour #1.
I have not yet looked into why this happens. Before I tried your middleware, I used
errors.Is
to manually map custom errors onto http status codes. Generally the usage oferrors.Is
seems to be the right choice.The text was updated successfully, but these errors were encountered: