Skip to content

Commit

Permalink
Print invalid JSON responses in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Piccirello committed May 15, 2020
1 parent 4dacb4d commit 358c152
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ func performRequest(req *http.Request, verifyTLS bool, params []queryParam) (int
var errResponse errorResponse
err = json.Unmarshal(body, &errResponse)
if err != nil {
utils.LogDebug(fmt.Sprintf("Unable to parse response body: \n%s", string(body)))
return response.StatusCode, nil, err
}

Expand Down

0 comments on commit 358c152

Please sign in to comment.