refine non-ok status message

This commit is contained in:
Alexander Zobnin
2020-08-28 19:20:28 +03:00
parent 9f2530d756
commit 8f70a0c4be

View File

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