MCPcopy Create free account
hub / github.com/github/gh-aw / createRateLimitError

Function createRateLimitError

actions/setup/js/create_pull_request.test.cjs:3573–3578  ·  view source on GitHub ↗

* Creates a mock GitHub API rate-limit error object (HTTP 403 with x-ratelimit-remaining: 0) * that matches what octokit returns when the installation token quota is exhausted. * @param {string} [message] * @returns {Error}

(message = "API rate limit exceeded")

Source from the content-addressed store, hash-verified

3571 * @returns {Error}
3572 */
3573 function createRateLimitError(message = "API rate limit exceeded") {
3574 return Object.assign(new Error(message), {
3575 status: 403,
3576 response: { headers: { "x-ratelimit-remaining": "0" }, status: 403 },
3577 });
3578 }
3579
3580 beforeEach(() => {
3581 originalEnv = { ...process.env };

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected