-
Notifications
You must be signed in to change notification settings - Fork 531
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
failureHandler never called after upgrade to v3.5.0 #799
Comments
Maybe you are affected from this? #739 |
Thanks for the pointer to that issue. |
@slinkydeveloper can you investigate ? I'm going to scope it for 3.5.1 |
I just tried to configure an empty project with version 3.4.1 with your code and It throws the default 404. |
You're right, I'm afraid my example code above was not complete. Sorry about that!
And guess what? It's a change in that StaticHandler that explains the behaviour I'm experiencing. So the solution in my case is to not rely on a failure in the StaticHandler but instead specify another catch-all route that will be triggered when the requested file can't be served by the StaticHandler. |
If you are interested I've created a PR that allows you to create an handler that manages 404 error #801 |
@pmlopes shouldn't the new behavior of |
@slinkydeveloper sounds interesting |
what's the status of this issue ? |
I think it's just a matter of clearly documenting the new behaviour in the breaking-changes document. |
@slinkydeveloper can you take care of providing a PR for this as it is related to #801 ? |
I think that beahviour added by 3a0005d#diff-1ebbcde17b4a2cabb90c51567ae716aa is right. For example let's say you have a router like:
And a webroot dir like:
In this situation, without 3a0005d#diff-1ebbcde17b4a2cabb90c51567ae716aa the router will throw unexpected 404 when you do a request to I'm going to update the doc describing this behaviour. |
Signed-off-by: francesco <francescoguard@gmail.com>
thanks |
Version
Context
After I upgraded from v3.4.1 to v3.5.0 I noticed that failureHandlers are never called.
Router is defined like this:
A call to http://localhost returns "Welcome to the homepage", but a call to e.g. http://localhost/test returns the default "Resource not found" instead of "Routing failure!"
Do you have a reproducer?
No
Steps to reproduce
Just set up a webserver with a router as explained in the example above and try to access the root ("/") and then "/test".
As a result the request to "/test" returns the default 404 message instead of the custom message defined in the failureHandler
Please note that the exact same code worked before the upgrade to Vert.x 3.5.0
Extra
/
The text was updated successfully, but these errors were encountered: