-
Notifications
You must be signed in to change notification settings - Fork 184
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
Custom 404 Page #885
Comments
Yep, it's not well documented, but you should be able to do this by adding class NotFoundPage {
handleRoute() {
return {code: 404, hasDocument: true};
}
getElements() {
return <Awesome404 />;
}
} |
@gigabo That works, thank you. I had figured how to return the code, however I was still missing the I could open a PR for documenting this somewhere in the docs (maybe where I would have expected to find it). Maybe one of the examples could also have a custom 404 page? |
@feychou Yeah, that would be awesome! |
This was fixed in #893; closing |
Is there a way to easily customise the 404 response - for instance with a custom page?
I also tried to add my catch-all route in the route entry file and associate it with a not-found-page: however, this results in a 200. Is there a way to define the 404 status code in the page lifecycle?
The text was updated successfully, but these errors were encountered: