There are a couple of minor fixes we should do to improve our error handling in general. Ideally, we want to stop the user from doing common error-causing actions on the frontend, and in the case of unexpected errors we want to display them better.
Here are some of them:
[x] Disable frontend icons for editing and copying a timetable if the timetable is archived in ViewTimetable.tsx and add a tooltip telling them it's not allowed
[x] Make a better-looking 404 page (NotFound.tsx)
[x] Trying to view / edit timetables that do not exist (like this) should redirect to the 404 page
The reason for the 400 is because of Zod's validation. If it's possible, we should redirect them to the 404 page. If not, it's probably best to remove that check and handle it in the backend.
There are a couple of minor fixes we should do to improve our error handling in general. Ideally, we want to stop the user from doing common error-causing actions on the frontend, and in the case of unexpected errors we want to display them better.
Here are some of them:
ViewTimetable.tsx
and add a tooltip telling them it's not allowedNotFound.tsx
)