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 of errors.Is seems to be the right choice.
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.Isto manually map custom errors onto http status codes. Generally the usage oferrors.Isseems to be the right choice.