Exclude headers from error

This commit is contained in:
qwerty287 2024-07-20 09:41:06 +00:00
parent e2b63c6b49
commit 136185be68

View file

@ -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 {