diff --git a/README.md b/README.md index 39d00374c5..65a87c789f 100644 --- a/README.md +++ b/README.md @@ -275,7 +275,7 @@ The time zone header will determine the timezone used for generating the timesta `Octokit` implements request throttling using [`@octokit/plugin-throttling`](https://github.com/octokit/plugin-throttling.js/#readme) -By default, requests are retried once and warnings are logged in case hitting a rate or abuse limit +By default, requests are retried once and warnings are logged in case of hitting a rate or secondary rate limit ```js { @@ -290,9 +290,9 @@ By default, requests are retried once and warnings are logged in case hitting a return true; } }, - onAbuseLimit: (retryAfter, options, octokit) => { + onSecondaryRateLimit: (retryAfter, options, octokit) => { octokit.log.warn( - `Abuse detected for request ${options.method} ${options.url}` + `SecondaryRateLimit detected for request ${options.method} ${options.url}` ); if (options.request.retryCount === 0) { diff --git a/src/octokit.ts b/src/octokit.ts index 6654382c6f..39a3acb235 100644 --- a/src/octokit.ts +++ b/src/octokit.ts @@ -15,7 +15,7 @@ export const Octokit = OctokitCore.plugin( userAgent: `octokit.js/${VERSION}`, throttle: { onRateLimit, - onAbuseLimit, + onSecondaryRateLimit, }, }); @@ -33,9 +33,9 @@ function onRateLimit(retryAfter: number, options: any, octokit: any) { } // istanbul ignore next no need to test internals of the throttle plugin -function onAbuseLimit(retryAfter: number, options: any, octokit: any) { +function onSecondaryRateLimit(retryAfter: number, options: any, octokit: any) { octokit.log.warn( - `Abuse detected for request ${options.method} ${options.url}` + `SecondaryRateLimit detected for request ${options.method} ${options.url}` ); if (options.request.retryCount === 0) {