Closed
Description
Version
- vert.x core: 3.5.0
- vert.x web: 3.5.0
Context
After I upgraded from v3.4.1 to v3.5.0 I noticed that failureHandlers are never called.
Router is defined like this:
Router router = Router.router(vertx);
router.get("/").handler(ctx -> {
ctx.response().putHeader("content-type", "text/plain").end("Welcome to the homepage!");
});
router.route().failureHandler(ctx -> {
ctx.response().putHeader("content-type", "text/plain").end("Routing failure!");
});
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
/
Metadata
Metadata
Assignees
Labels
No labels