mirror of
https://github.com/Octops/quake-kube.git
synced 2026-04-08 10:50:34 +00:00
Add context to content-server assets download error
This commit is contained in:
@ -18,6 +18,10 @@ func GetBody(url string) ([]byte, error) {
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return nil, errors.Errorf("cannot get url %q: %v", url, http.StatusText(resp.StatusCode))
|
||||
}
|
||||
|
||||
return ioutil.ReadAll(resp.Body)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user