Closed ruichen199801 closed 1 year ago
Now user will be shown an error message and get directed to landing page if:
User will be directed to 404 page without an error message if:
/notfound
, /user/1
It's not necessary to have an exception page for other http error responses such as 500
, in which case we expect the app to direct user to landing page.
We can redirect the user to landing page (
/
) if they go to a route that doesn't exist, and send them an error message.For better user experience, we can create a 404 not found page when the route doesn't have any matches, like
<Route path="*" element={<PageNotFound />} />
.