Exclude headers from error
This commit is contained in:
parent
e2b63c6b49
commit
136185be68
1 changed files with 1 additions and 2 deletions
|
@ -414,8 +414,7 @@ func statusCodeToErr(resp *Response) (body []byte, err error) {
|
|||
// plain string, so we try to return a helpful error anyway
|
||||
path := resp.Request.URL.Path
|
||||
method := resp.Request.Method
|
||||
header := resp.Request.Header
|
||||
return data, fmt.Errorf("unknown API Error: %d\nRequest: '%s' with '%s' method '%s' header and '%s' body", resp.StatusCode, path, method, header, string(data))
|
||||
return data, fmt.Errorf("unknown API Error: %d\nRequest: '%s' with '%s' method and '%s' body", resp.StatusCode, path, method, string(data))
|
||||
}
|
||||
|
||||
if msg, ok := errMap["message"]; ok {
|
||||
|
|
Loading…
Reference in a new issue