Refactor error handling in isRateLimitError function for improved clarity

This commit is contained in:
priyagupta108 2026-07-09 09:40:20 +05:30
parent 9737be46d4
commit 0bc3767d34
3 changed files with 8 additions and 12 deletions

4
dist/setup/index.js vendored
View file

@ -55725,8 +55725,8 @@ function sleep(ms) {
}
// HTTP 403/429 from http-client (`statusCode`) or tool-cache (`httpStatusCode`).
function isRateLimitError(err) {
const status = err.httpStatusCode ??
err.statusCode;
const e = err;
const status = e?.httpStatusCode ?? e?.statusCode;
return status === 403 || status === 429;
}
// Fetches and validates a manifest, retrying transient failures with backoff.