We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5bcdfd8 commit fa36421Copy full SHA for fa36421
1 file changed
cmd/upgrade/upgrade.go
@@ -170,6 +170,10 @@ func fetchLatestRelease() (*githubRelease, error) {
170
}
171
defer resp.Body.Close() //nolint:errcheck
172
173
+ // GH sends 403 on rate limit exhaust
174
+ if resp.StatusCode == http.StatusForbidden || resp.StatusCode == http.StatusTooManyRequests {
175
+ return nil, fmt.Errorf("GitHub API rate limit reached — try again in a few minutes")
176
+ }
177
if resp.StatusCode != http.StatusOK {
178
return nil, fmt.Errorf("GitHub API returned %d", resp.StatusCode)
179
0 commit comments