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
Puma does not handle SyntaxError properly #1027
Comments
Roda rescues both StandardError and ScriptError in its error handling plugin, it might be a good idea for Puma to do something similar. |
Fixed! Thanks for pointing it out, I agree (and thusly followed suit with the code change) that it should catch more exceptions here. |
Thanks! Any reasons for not simply rescue Exception? |
I've done that before though I'm generally against it because it also catches NoMemoryError, for which there is really no recovery and the process needs to just die. Though, ThreadPool does rescue Exception so, actually, I should probably change it to Exception. |
I see, it makes sense. Even when no memory is available I believe it's a valid attempt trying to better handle the response. Thanks. |
Please take a look at the responses for these two Rack apps. It seems Puma doesn't handle SyntaxError properly as it does for regular errors:
Would it be possible for Puma to fix the HTTP response in the latter case?
The text was updated successfully, but these errors were encountered: