Skip to content

[Bug] Fix incorrect error handling  #65

Closed
@phoenixpereira

Description

@phoenixpereira

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 or https://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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions