Skip to content

Commit

Permalink
Update abuse detection code to reflect GitHub's current error
Browse files Browse the repository at this point in the history
  • Loading branch information
dontcallmedom committed Sep 6, 2021
1 parent 61bcddc commit dd95e59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export function throttling(octokit: Octokit, octokitOptions = {}) {
options.request.retryCount = retryCount;

const { wantRetry, retryAfter } = await (async function () {
if (/\babuse\b/i.test(error.message)) {
if (/\bsecondary rate\b/i.test(error.message)) {
// The user has hit the abuse rate limit. (REST and GraphQL)
// https://docs.github.com/en/rest/overview/resources-in-the-rest-api#abuse-rate-limits

Expand Down

0 comments on commit dd95e59

Please sign in to comment.