thephpleague/booboo

exceptionHandler doesn't return 500 status when displaying errors

Closed this issue · 2 comments

Is it by design to mimic how PHP behaves or can I submit a pull request to add the 500 status header when display_errors is set to true?

My main problem with the actual implementation is when I make Ajax request I get a 200 status header even though the request crashed.

If it's by design, should I make my own formatter to add the status header, or is there a better way?

I have the same problem, I agree with @nebulousGirl that all responses should be 500 when some error occours, in my case the CDN Service cached an error page because it was 200.

According to the code a 500 error is rendered when fatalErrors happen.

Edit: but now I see more clearly what the issue is... this is only used in specific conditions and never (?) for fatal errors?