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

Have proper HTTP error codes on the API #35

Open
jan-xyz opened this issue Jul 31, 2017 · 1 comment
Open

Have proper HTTP error codes on the API #35

jan-xyz opened this issue Jul 31, 2017 · 1 comment

Comments

@jan-xyz
Copy link
Contributor

jan-xyz commented Jul 31, 2017

The API should have consistent and proper usage of HTTP error codes.

Right now wrong usage mostly results in an Internal Server Error (50x) and doesn't properly tell the user what went wrong. Furthermore, the API sometimes doesn't respond with an error code at all when obviously user input wasn't okay (see uploading files).

See https://httpstatuses.com for a list of responses.

@jan-xyz
Copy link
Contributor Author

jan-xyz commented Jul 31, 2017

I would like to tackle that once the new frontend is working properly. While I'm working on that I am coming a cross multiple instances where the API doesn't handle errors properly. I will track the instances in this ticket.

So far:

  • Internal Server Error when accessing visualiser that isn't available should be a 404 instead
  • Internal Server Error when accessing image that isn't available should be a 404 instead
  • OK (200) when doing something wrong during upload should be an error (multiple cases?)

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