Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Status code from exceptions #26

Open
snapshotpl opened this issue Nov 19, 2014 · 3 comments
Open

Status code from exceptions #26

snapshotpl opened this issue Nov 19, 2014 · 3 comments

Comments

@snapshotpl
Copy link

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

@michalkopacz
Copy link

👍

@snapshotpl
Copy link
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.

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas-api-tools/api-tools-api-problem; a new issue has been opened at laminas-api-tools/api-tools-api-problem#7.

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

No branches or pull requests

3 participants