-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
bug: "not found" handler intercepts already matched routes #36
Comments
I need to think what to do. Wildcard grab everything, I'm not sure if this is a bug. I need to see if I can make it work as expected. |
What can be a workaround to implement "not found" page in meantime? |
You will need to do your own routing with a single wildcard, but this will be almost the same as not using a library at all. The routing library is not exposed, but it's based on route.js. |
It looks like this is how you add 404 page to express.js, so this is something that should be implemented. |
So the workaround now is to use wildcard as first route:
|
It should work now as expected, the way route works, is search from the end and first found was used. Now if there are more than 1 routes it picks first non wildcard. |
I'm releasing next version to NPM. |
I have a handler defined for my index page route as below:
Then I want to add handler to show "not found" page for all other routes
Unfortunately when added this wildcard handler following after index route, then index route is not working anymore as expected and instead it shows "not found" message for defined index route as well.
The text was updated successfully, but these errors were encountered: