AlexsLemonade / refinebio-web

Refinebio Web
https://staging.web.refine.bio
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Implement error handling for API resource requesets for the search results page #271

Closed nozomione closed 9 months ago

nozomione commented 10 months ago

Context

We currently configured error handling in _app using Sentry-integrated React.js ErrorBoundry with our custom error component which handles server-side errors 500 and 504 and a runtime error 404 at the page level. We'll also need to implement error handling for API resource requests and display an appropriate error view in a page based on the status code returned by the server.

This issue is to implement error handling for the search endpoint.

Problem or idea

We should implement error handling for search results page and render an appropriate error view based on the error status code returned by the server.

e.g., 504 Error:

Screenshot 2023-11-09 at 4 29 04 PM

Solution or next step

(*due to frequent PR merges, the most recent PR's feature branch will be used as the base branch to reduce merge conflicts)