Skip to content
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

Handle response errors #80

Open
thePeras opened this issue Jun 7, 2024 · 0 comments
Open

Handle response errors #80

thePeras opened this issue Jun 7, 2024 · 0 comments

Comments

@thePeras
Copy link
Member

thePeras commented Jun 7, 2024

A quick note is that no other endpoint is handling errors by returning the correct HTTP status code. For example, the the course endpoint does not return the correct HTTP status code if the year is not found.

I added a response/errors.py folder in order to report a 404 not found error with a custom message for the course unit id not being found (`e.g. the first() method returns None)

This folder is a start of an attempt of introducing that kind of behaviour to our API.

Originally posted by @tomaspalma in #78 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant