usdevs / usc-website-hackathon-frontend

Prototype frontend
https://usc-website-hackathon-frontend.vercel.app
2 stars 4 forks source link

Frontend API error handling #161

Open zsh-eng opened 6 months ago

zsh-eng commented 6 months ago

Currently, the website crashes if the backend does not provide a response / provides a response of the wrong format.

We should

  1. Handle backend errors more gracefully
  2. Display a better error page

Reference: https://nextjs.org/docs/pages/building-your-application/routing/custom-error#customizing-the-500-page