mirror of
https://github.com/github/codeql-action.git
synced 2026-01-01 04:00:24 +08:00
Add configuration error for rate limited CodeQL download
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user