refine non-ok status message
This commit is contained in:
@@ -170,7 +170,7 @@ func makeHTTPRequest(ctx context.Context, httpClient *http.Client, req *http.Req
|
|||||||
defer res.Body.Close()
|
defer res.Body.Close()
|
||||||
|
|
||||||
if res.StatusCode != http.StatusOK {
|
if res.StatusCode != http.StatusOK {
|
||||||
return nil, fmt.Errorf("invalid status code. status: %v", res.Status)
|
return nil, fmt.Errorf("request failed, status: %v", res.Status)
|
||||||
}
|
}
|
||||||
|
|
||||||
body, err := ioutil.ReadAll(res.Body)
|
body, err := ioutil.ReadAll(res.Body)
|
||||||
|
|||||||
Reference in New Issue
Block a user