Skip to content

Commit

Permalink
Merge pull request #211 from pace/fix-roundtripper-ignored-error-dump
Browse files Browse the repository at this point in the history
Return on error when RoundTrip()'ing
  • Loading branch information
nicmue authored Jun 30, 2020
2 parents 9ef01d5 + 0dbd568 commit 3f73bc7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion http/transport/dump_round_tripper.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ func (l *DumpRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)
}

resp, err := l.Transport().RoundTrip(req)

if err != nil {
return resp, err
}
// response logging
if l.DumpResponse || l.DumpResponseHEX {
respDump, err := httputil.DumpResponse(resp, l.DumpBody)
Expand Down

0 comments on commit 3f73bc7

Please sign in to comment.