http: status string already includes the status code
This commit is contained in:
parent
5e469db420
commit
1045344943
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ func statusError(res *http.Response, err error) error {
|
||||||
}
|
}
|
||||||
if res.StatusCode < 200 || res.StatusCode > 299 {
|
if res.StatusCode < 200 || res.StatusCode > 299 {
|
||||||
_ = res.Body.Close()
|
_ = res.Body.Close()
|
||||||
return fmt.Errorf("HTTP Error %d: %s", res.StatusCode, res.Status)
|
return fmt.Errorf("HTTP Error: %s", res.Status)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue