Context
We've implemented error handling at both the app level and the page level.
At the app level, we handle the following errors:
404 Not Found
500 Internal Error
504 Gateway Timeout
Currently, at the page level, we only handle 404 Not Found.
Problem or idea
We want to refactor the page components to handle both 404 and 500 errors.
The changes should be as follows:
- Return a
404 response when no resource is found.
- Return a
500 response otherwise
Solution or next step
Update the following page components to handle 404 and 500 errors within getServerSideProps:
pages/compendia/
pages/dataset/
pages/experiments/
pages/search
Context
We've implemented error handling at both the app level and the page level.
At the app level, we handle the following errors:
404 Not Found500 Internal Error504 Gateway TimeoutCurrently, at the page level, we only handle
404 Not Found.Problem or idea
We want to refactor the page components to handle both
404and500errors.The changes should be as follows:
404response when no resource is found.500response otherwiseSolution or next step
Update the following page components to handle
404and500errors withingetServerSideProps:pages/compendia/pages/dataset/pages/experiments/pages/search