Closed ConnyOnny closed 8 years ago
Hey,
currently in router.rs it says:
router.rs
self.handle_method(req, &path).unwrap_or( Err(IronError::new(NoRoute, status::NotFound)) )
It would be nice if this was less hardcoded and if it was possible to create a custom NotFound error page. Maybe add an optional special handler to the Router struct?
NotFound
Router
You can catch the NoRoute error in an AfterMiddleware and render your own 404 page there. Does that solve your problem?
NoRoute
AfterMiddleware
Yeah that solves it. Thanks.
Hey,
currently in
router.rs
it says:It would be nice if this was less hardcoded and if it was possible to create a custom
NotFound
error page. Maybe add an optional special handler to theRouter
struct?