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
Why? I am expecting for ONLY the NotFoundHandler to kick in, but it is executing the entire chain of middlewares.
Is there an option in the router that I am missing? Is this the expected behaviour?
My config:
chi v5 (v5.0.12)
go 1.22.2
MBP M1 Apple
The text was updated successfully, but these errors were encountered:
Edenshaw
changed the title
When registering a custom Middleware and a custom NotFoundHandler, both are executed with a 404 URL
When registering a custom Middleware and a custom NotFoundHandler, both are executed when a 404 URL is loaded
Apr 16, 2024
Hi, I have the following code:
When I start the server and go to the following URLs I see a strange behaviour:
Hello! You have requested the book with Id: 453452345 Current date and time: Tue Apr 16 17:50:18.841064 -05 2024
So far, all good. Both handlers were executed:
getSimpleMiddleware
andprintBookInfoHandler
Why? I am expecting for ONLY the
NotFoundHandler
to kick in, but it is executing the entire chain of middlewares.Is there an option in the router that I am missing? Is this the expected behaviour?
My config:
chi v5 (v5.0.12)
go 1.22.2
MBP M1 Apple
The text was updated successfully, but these errors were encountered: