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

Problem with headers in error handler #15

Open
nergal opened this issue Dec 10, 2014 · 1 comment
Open

Problem with headers in error handler #15

nergal opened this issue Dec 10, 2014 · 1 comment
Labels
Milestone

Comments

@nergal
Copy link
Owner

nergal commented Dec 10, 2014

In current realisation error handler does not consider error type, so http headers in response does not reflect status of processed action.

As example I mean that "not found" action must use 404 status and error action must use 500.

At first, I propose to wrap errors in Response object and extends it by using http status codes (something like Response::setStatus(int $status)).

At second, Bottle_Exception's property "code" shall correlate with status code that current exception must to represent.

@nergal nergal added the major label Dec 10, 2014
@nergal nergal added this to the v0.1.0 milestone Dec 10, 2014
@vegaelle
Copy link
Collaborator

I have plans for error management. Beside of being wrapped in a Response, an user should be able to overwrite them. I am working on a new handler design to achieve this.

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

No branches or pull requests

2 participants