-
-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
before_all handler isn't called for error routes #663
Comments
Looks like a bug to. me, thanks a lot for reporting @syeopite I'll put this as priority in my pipeline 👍 |
My initial findings show that |
Might be the exception handler short-circuiting the response and ignoring filter handlers |
It seems, like the filter handler does not get the blocks if a route is not found? kemal/src/kemal/filter_handler.cr Line 16 in cb9adcd
Commenting that line seems to make the original example work, but from a quick search I could not find the reasoning for it to be there in the first place. Happy to try and put in a PR to fix if you give some pointers on why it's there. |
Description
It seems like the
before_all
handler isn't called for the error routes.Steps to Reproduce
Take a simple project with a
before_all
handler:Query a route that doesn't exist such as
0.0.0.0:3000/route
Notice that the
before_all
handler isn't calledExpected behavior:
Actual behavior: [What actually happens]
Reproduces how often: [What percentage of the time does it reproduce?]
100% of the time
Versions
The text was updated successfully, but these errors were encountered: