-
I wrote a custom middle ware to handle authentication and other things the way we want it to work on our application.
I am registering this middleware with
I would expect this to return echo.ErrUnauthorized back to the requesting client. However it still returns the target endpoints data. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Well I'll answer my own question...
|
Beta Was this translation helpful? Give feedback.
Well I'll answer my own question...
This was copied out of the middle ware example on the docs page. The comments/code looks like its just an error handler for something but its actually processing the middleware chain and looking for an error before processing the code below it.
This makes sense for the statistics logger example given.
However its really bad for boiler plate middleware code....oh well I hope someone on the google fu finds this and can learn from my mistake