Return HTTP Status 500 for PHP errors and fatal errors · Issue #6852 · matomo-org/matomo · GitHub
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

Return HTTP Status 500 for PHP errors and fatal errors #6852

Closed
mnapoli opened this issue Dec 15, 2014 · 0 comments
Closed

Return HTTP Status 500 for PHP errors and fatal errors #6852

mnapoli opened this issue Dec 15, 2014 · 0 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@mnapoli
Copy link
Contributor

mnapoli commented Dec 15, 2014

Currently when an error/exception occurs, Piwik returns a 200 HTTP status and that can mess up with a lot of things.

Current status:

Web Tracker
Fatal error 200 200
PHP error 200 200
Exception 200 200

Target:

Web Tracker
Fatal error 500 500
PHP error 500 500
Exception ? ?

For uncaught exceptions, we are not sure we want to return a 500 because exceptions could be for example "unknown idSite" which should be a 404. Same for 403 I guess (I haven't looked at the code)

However it definitely should not be a 200 as it is now. We should probably improve how exceptions are handled in some cases (404, 403…).

@mnapoli mnapoli added the Bug For errors / faults / flaws / inconsistencies etc. label Dec 15, 2014
@mnapoli mnapoli self-assigned this Dec 15, 2014
@mnapoli mnapoli added this to the Piwik 2.11.0 milestone Dec 15, 2014
@mnapoli mnapoli closed this as completed Jan 5, 2015
@mattab mattab changed the title Status 500 for fatal errors Return HTTP Status 500 for PHP errors and fatal errors Feb 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

1 participant