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

Dump all responses, before bailing out for non-successful http status codes #553

Merged
merged 1 commit into from
Jul 18, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Dump all responses, before bailing out for non-successful http status…
… codes
  • Loading branch information
nvartolomei committed Jul 11, 2017
commit 311418eb12efd5cb40bfb9b91b55d59adc0b211e
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