Add configuration error for rate limited CodeQL download

This commit is contained in:
Henry Mercer
2025-10-08 14:43:54 +01:00
parent 8301b8b096
commit 98abb870dc
14 changed files with 328 additions and 129 deletions

View File

@@ -3,6 +3,7 @@ import * as path from "path";
import * as core from "@actions/core";
import * as toolrunner from "@actions/exec/lib/toolrunner";
import { RequestError } from "@octokit/request-error";
import * as yaml from "js-yaml";
import {
@@ -370,7 +371,8 @@ export async function setupCodeQL(
} catch (e) {
const ErrorClass =
e instanceof util.ConfigurationError ||
(e instanceof Error && e.message.includes("ENOSPC")) // out of disk space
(e instanceof Error && e.message.includes("ENOSPC")) || // out of disk space
(e instanceof RequestError && e.status === 429) // rate limited
? util.ConfigurationError
: Error;