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

Function isRateLimitError

actions/setup/js/error_helpers.cjs:78–81  ·  view source on GitHub ↗

* Check if an error is due to a GitHub API rate limit being exceeded. * This includes both installation-level and user-level rate limits. * Used to determine if a check should fail-open (allow workflow to proceed) * rather than hard-failing when the error is transient. * * @param {unknown} erro

(error)

Source from the content-addressed store, hash-verified

76 * @returns {boolean} True if error is due to API rate limiting, false otherwise
77 */
78function isRateLimitError(error) {
79 const errorMessage = getErrorMessage(error);
80 return /\bapi rate limit\b|\brate limit exceeded\b/i.test(errorMessage);
81}
82
83module.exports = { getErrorMessage, isHtmlContent, isLockedError, isRateLimitError };

Callers 6

runRangeReportFunction · 0.70
mainFunction · 0.70
shouldRetryFunction · 0.70

Calls 1

getErrorMessageFunction · 0.70

Tested by 1

shouldRetryFunction · 0.56