How to define a 404 or not found page in SSR file based ? (v1.1.4) #937
Unanswered
Thisisjuke
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone!
I want to implement a 404 route in an SSR file based project (same setup as the demo on the documentation).
Do you have any information in the documentation about that or a code snippet somewhere please ? Just creating a file name not_found.tsx is not doing the trick. I saw a discord post speaking about
NotFoundError()
but I don't have any clue.My goal is to throw a 404 from a loader if fetched ressource doesn't exist:
I want to have a global 404 page based on file (something like 404.tsx or anything else), that catch all router 404 errors and I want to have a way to throw an error, maybe
NotFoundError
and to be able to redirect to this 404 page manually (by throwing error or callingredirect
).Thx ! ✌️
Beta Was this translation helpful? Give feedback.
All reactions