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

Requests for JSON return HTML when there is an error #1

Open
dbrnz opened this issue May 28, 2016 · 1 comment
Open

Requests for JSON return HTML when there is an error #1

dbrnz opened this issue May 28, 2016 · 1 comment

Comments

@dbrnz
Copy link

dbrnz commented May 28, 2016

A request for JSON content (using an accept header of application/vnd.physiome.pmr2.json.1) returns text/html when there is an error. This content includes the error log number. Could a suitable JSON response be returned instead? This would simplify debugging of client interfaces.

@metatoaster
Copy link
Member

Unfortunately, these error log numbers are generated by the underlying Zope/Plone system and to override them is rather difficult. Please have your client check the HTTP status code before attempting to parse the content.

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