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

Send 500 response on exceptions #8360

Closed
mrclay opened this Issue May 25, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@mrclay
Member

mrclay commented May 25, 2015

I looked through the history of _elgg_php_exception_handler and couldn't find a decent justification for sending a 200. In particular this confuses client-side scripts making XHR requests, who then try to interpret the HTML exception message.

See also #6228

@mrclay mrclay added the bug label May 25, 2015

@mrclay

This comment has been minimized.

Show comment
Hide comment
@mrclay

mrclay May 25, 2015

Member

cc @brettp any insight here?

Member

mrclay commented May 25, 2015

cc @brettp any insight here?

mrclay added a commit to mrclay/Elgg-leaf that referenced this issue May 25, 2015

fix(http): More appropriate exception responses
Uncaught exception responses now have a 500 HTTP code, and XHR requests
are given a JSON response.

Fixes #6228
Fixes #8360
@mrclay

This comment has been minimized.

Show comment
Hide comment
@mrclay
Member

mrclay commented May 25, 2015

PR #8362

@jdalsem jdalsem closed this May 26, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment