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

Handling of 500 errors #85

Closed
asaunier opened this issue Nov 26, 2015 · 3 comments
Closed

Handling of 500 errors #85

asaunier opened this issue Nov 26, 2015 · 3 comments
Milestone

Comments

@asaunier
Copy link
Member

(Just a question, perhaps the current behaviour is OK)

When making AJAX requests to the API from the UI, if the API crashed because of some error (eg. missing field in DB), Angular's $http actually returns an object with "status: 500" (which is correct) and a data properties containing an HTML output with the 500 error returned by the API.
Should we do something in order to get a cleaner JSON output instead of the raw pyramid 500 page?

@gberaudo
Copy link
Contributor

I agree we should return json.

@tsauerwein
Copy link
Member

Yes, you are right. JSON would be cleaner.

@asaunier
Copy link
Member Author

Same with 403 errors returned by the API when a user tries to make a write action from the UI without being authenticated.

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

No branches or pull requests

4 participants