Currently, when requesting a department with an ID that does not exist, an error is thrown due to no rows being returned. This should instead gracefully error, and return a 404 to the user.
We should also validate that the URL param is a valid number, and return a 400 when it is not.
Currently, when requesting a department with an ID that does not exist, an error is thrown due to no rows being returned. This should instead gracefully error, and return a 404 to the user.
We should also validate that the URL param is a valid number, and return a 400 when it is not.
https://github.com/DegreePrerequisiteTracker/Degree-Prerequisite-Tracker/blob/main/src/api/departments.ts#L31C1-L42C4