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 200 when using set_exception_handler #72

Closed
oadam opened this issue Dec 11, 2015 · 5 comments
Closed

status 200 when using set_exception_handler #72

oadam opened this issue Dec 11, 2015 · 5 comments
Assignees

Comments

@oadam
Copy link

oadam commented Dec 11, 2015

I'm using rollbar with great success but today I've noticed something that bothers me.

My code is using exception to report invalid GET parameters.
In dev, when I call an invalid URL, I get a 500 error and the error is logged by php.
In prod, where rollbar is enabled, I obtain a blank page with a 200 status.

Having a 200 status can be an issue for a number of reasons (for example because it means a search engine could index pages whose URL is invalid).

In my opinion, most people would like the server to return a 5XX status, so it makes sense to implement this in rollbar's error_handler.

Do you think that's a good idea ?

@Crisfole
Copy link
Contributor

Hey there, sorry for the long delay!

I don't think we're purposely setting the status to 200. On my end I still get a 500 when I report something to Rollbar.

Are you sure this is the application and not your server in production? (Apache can easily do stuff like this, for example).

@nocive
Copy link
Contributor

nocive commented Feb 2, 2017

Seeing this exact same behaviour too after switching to php7.
It's definitely a rollbar related problem because when rollbar is not enabled everything works as expected.

@nocive
Copy link
Contributor

nocive commented Feb 2, 2017

See also getsentry/sentry-php#280 for what seems like the same issue.

@rokob rokob added this to the v1.1.0 Release milestone Apr 26, 2017
@ArturMoczulski
Copy link
Contributor

This is ready for review in PR #143

@ArturMoczulski ArturMoczulski self-assigned this Apr 29, 2017
rokob added a commit that referenced this issue May 4, 2017
…andler

GitHub Issue #72: status 200 when using set_exception_handler
@rokob
Copy link
Contributor

rokob commented May 4, 2017

Fixed in #143

@rokob rokob closed this as completed May 4, 2017
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

5 participants