mirror of https://github.com/docker/docs.git
Merge pull request #1371 from nathanleclaire/github_api_rate_limit
Add more useful error message when possibly getting rate limited by Github
This commit is contained in:
commit
a4e90a558c
|
@ -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