Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
//Last route handler
router.route().handler(context -> {
System.out.println("failure");
HttpServerResponse response = context.response();
Route currentRoute = context.currentRoute();
if (currentRoute.getPath() == null) {
response.setStatusCode(HttpStatus.SC_NOT_FOUND);
response.end("Error");
return;
}
context.next();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.