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

Make API error messages visible to users #189

Open
corviday opened this issue Mar 26, 2021 · 1 comment
Open

Make API error messages visible to users #189

corviday opened this issue Mar 26, 2021 · 1 comment

Comments

@corviday
Copy link
Contributor

The APIs raise a variety of Exceptions with helpful texts, like this one in the data API, raised when a caller submits an unparseable time value. These messages are visible when running the backend on your workstation, which is helpful, but the live backend just displays a generic 500 message when you set the time paramter to "q".

Sending the error messages differently, or maybe setting up the security of the live servers differently might be helpful for users.

@rod-glover
Copy link
Contributor

There ought to be a way to catch these errors and turn them into sensible HTTP error pages. I know I have done it for some Flask apps, but it's not anything particular to Flask. There are a variety of error codes we might return, several in the 4xx range for various conditions (e.g., 400 Bad Request, 404 Not Found). 500 is the last resort for an unanticipated error. Any error we raise ourselves should probably be turned into a 4xx.

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

2 participants