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

Content negotiation for errors (404, 405, ...) #7

Open
weierophinney opened this issue Dec 31, 2019 · 2 comments
Open

Content negotiation for errors (404, 405, ...) #7

weierophinney opened this issue Dec 31, 2019 · 2 comments

Comments

@weierophinney
Copy link
Contributor

Will be nice if the response of a global error thrown by the library respect the media type provided by Accept header.

This is when error is thrown to a browser (Accept: text/html) error is rendered like now but if it's thrown to the API client (Accept: application/*json) return application/problem+json response.


Originally posted by @Maks3w at zfcampus/zf-rest#72

@weierophinney
Copy link
Contributor Author

The final idea is all errors returned from any application layer (PHP, ZF2, zf-rest, user resource) should have the same response type.


Originally posted by @Maks3w at zfcampus/zf-rest#72 (comment)

@weierophinney
Copy link
Contributor Author

+1 ... this seems to be a good idea .... is there any progress/comment, if this will be considered?


Originally posted by @jg-development at zfcampus/zf-rest#72 (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