-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Fix incorrect error handling #65
Comments
Hi @phoenixpereira and @SouthernPolaris , I think the issue lies in here at line 345, as Lines 334 to 349 in 18d1ca2
Let me know if I can work on this issue, will check it on my local for subjects and courses thanks, |
@rohitkrsoni Yeah that might be it, if can you fix it that will be great! |
PR: #69, someone please review it, thanks |
Description of the Bug
When making an invalid API request or a request for a course id that doesn't exist, it returns a response code of 500.
Reproduction Steps
Send a request to
https://courses-api.csclub.org.au/subjects
orhttps://courses-api.csclub.org.au/courses/aaa
.Expected Behaviour
When making an invalid API request, it should return a response code of 400 instead of 500. Similarly, requests with a non-existing course id should return 404 instead of 500.
Additional Notes
For some reason, restarting the Docker container temporarily fixes this issue.
The text was updated successfully, but these errors were encountered: