Skip to content

Commit 182859f

Browse files
authored
Fix secondary rate limits URL (#3001)
1 parent 942692e commit 182859f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

github/github.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ func (ae *AcceptedError) Is(target error) bool {
11331133
}
11341134

11351135
// AbuseRateLimitError occurs when GitHub returns 403 Forbidden response with the
1136-
// "documentation_url" field value equal to "https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits".
1136+
// "documentation_url" field value equal to "https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits".
11371137
type AbuseRateLimitError struct {
11381138
Response *http.Response // HTTP response that caused this error
11391139
Message string `json:"message"` // error message
@@ -1259,7 +1259,7 @@ func CheckResponse(r *http.Response) error {
12591259
}
12601260
case r.StatusCode == http.StatusForbidden &&
12611261
(strings.HasSuffix(errorResponse.DocumentationURL, "#abuse-rate-limits") ||
1262-
strings.HasSuffix(errorResponse.DocumentationURL, "#secondary-rate-limits")):
1262+
strings.HasSuffix(errorResponse.DocumentationURL, "secondary-rate-limits")):
12631263
abuseRateLimitError := &AbuseRateLimitError{
12641264
Response: errorResponse.Response,
12651265
Message: errorResponse.Message,

0 commit comments

Comments
 (0)