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

Status code from exceptions #7

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

Status code from exceptions #7

weierophinney opened this issue Dec 31, 2019 · 2 comments

Comments

@weierophinney
Copy link
Contributor

API Problem response with HTTP status code from exception when it's valid rage of HTTP codes. But what about situation when some library throws own exceptions, with own codes (example 302, and it means that user doesn't exist)? It does't make sense.
My solution for this is to use code from exceptions only when exception implements \ZF\ApiProblem\Exception\ExceptionInterface


Originally posted by @snapshotpl at zfcampus/zf-api-problem#26

@weierophinney
Copy link
Contributor Author

👍


Originally posted by @michalkopacz at zfcampus/zf-api-problem#26 (comment)

@weierophinney
Copy link
Contributor Author

Via http://tools.ietf.org/html/draft-nottingham-http-problem-07#section-4

Problem details are not a debugging tool for the underlying implementation; rather, they are a way to expose greater detail about the HTTP interface itself.


Originally posted by @snapshotpl at zfcampus/zf-api-problem#26 (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