Skip to content

Commit

Permalink
Dump all responses, before bailing out for non-successful http status…
Browse files Browse the repository at this point in the history
… codes (#553)
  • Loading branch information
nvartolomei authored and olivere committed Jul 18, 2017
1 parent c5730b1 commit 8f4f2ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1233,6 +1233,9 @@ func (c *Client) PerformRequest(ctx context.Context, method, path string, params
defer res.Body.Close()
}

// Tracing
c.dumpResponse(res)

// Check for errors
if err := checkResponse((*http.Request)(req), res, ignoreErrors...); err != nil {
// No retry if request succeeded
Expand All @@ -1241,9 +1244,6 @@ func (c *Client) PerformRequest(ctx context.Context, method, path string, params
return resp, err
}

// Tracing
c.dumpResponse(res)

// We successfully made a request with this connection
conn.MarkAsHealthy()

Expand Down

0 comments on commit 8f4f2ff

Please sign in to comment.