From 8f4f2ffa0a245fb02a5b6786fd5d9190eebcc286 Mon Sep 17 00:00:00 2001 From: nvartolomei Date: Tue, 18 Jul 2017 09:22:06 +0300 Subject: [PATCH] Dump all responses, before bailing out for non-successful http status codes (#553) --- client.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client.go b/client.go index c8cb17c87..db71d771e 100644 --- a/client.go +++ b/client.go @@ -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 @@ -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()