mirror of https://github.com/docker/docs.git
Add more useful error message when possibly getting rate limited by Github
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
This commit is contained in:
parent
6d26992101
commit
5687aeda5c
|
@ -83,7 +83,7 @@ func (b *B2dUtils) GetLatestBoot2DockerReleaseURL() (string, error) {
|
||||||
TagName string `json:"tag_name"`
|
TagName string `json:"tag_name"`
|
||||||
}
|
}
|
||||||
if err := json.NewDecoder(rsp.Body).Decode(&t); err != nil {
|
if err := json.NewDecoder(rsp.Body).Decode(&t); err != nil {
|
||||||
return "", err
|
return "", fmt.Errorf("Error demarshaling the Github API response: %s\nYou may be getting rate limited by Github.", err)
|
||||||
}
|
}
|
||||||
if len(t) == 0 {
|
if len(t) == 0 {
|
||||||
return "", fmt.Errorf("no releases found")
|
return "", fmt.Errorf("no releases found")
|
||||||
|
|
Loading…
Reference in New Issue