Skip to content

Commit

Permalink
Merge pull request #761 from stanhu/sh-epipe-show-server-response
Browse files Browse the repository at this point in the history
[fix] Read server response during EPIPE
  • Loading branch information
geemus committed Sep 16, 2021
2 parents 973e581 + dc10c8b commit 5f384be
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit 5f384be

Please sign in to comment.