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

[fix] Read server response during EPIPE #761

Merged
merged 1 commit into from Sep 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/excon/connection.rb
Expand Up @@ -190,6 +190,11 @@ def request_call(datum)
case error
when Excon::Errors::InvalidHeaderKey, Excon::Errors::InvalidHeaderValue, Excon::Errors::StubNotFound, Excon::Errors::Timeout
raise(error)
when Errno::EPIPE
# Read whatever remains in the pipe to aid in debugging
response = socket.read
error = Excon::Error.new(response + error.message)
raise_socket_error(error)
else
raise_socket_error(error)
end
Expand Down