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

HTTP::Server errors are silently ignored #9067

Closed
asterite opened this issue Apr 14, 2020 · 1 comment · Fixed by #9115
Closed

HTTP::Server errors are silently ignored #9067

asterite opened this issue Apr 14, 2020 · 1 comment · Fixed by #9115
Assignees

Comments

@asterite
Copy link
Member

These lines of code:

response.respond_with_status(:internal_server_error)
error.puts "Unhandled exception on HTTP::Handler"
ex.inspect_with_backtrace(error)
return

are not doing what one would expect. As soon as response.respond_with_error is called, the connection is closed and the next lines are not executed (I'm not sure if another exception is raised or what). Then you never get to see the error in the output.

I also think we should probably use Log here too.

@waj
Copy link
Member

waj commented Apr 16, 2020

This is probably happening when the client has closed the connection. Then the respond_with_status raise again.

I'll try to handle IO errors on HTTP::Server::Response directly so we differentiate issues when writing data to the client and just skip to close the connection.

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

Successfully merging a pull request may close this issue.

2 participants