Refactor configuration errors (#2105)
Refactor the existing classes of configuration errors into their own file; consolidate the place we check for configuration errors into `codeql.ts`, where the actual command invocations happen. Also, rename the `UserError` type to `ConfigurationError` to standardize on a single term.
This commit is contained in:
parent
fc9f9e5ef9
commit
1515e2bb20
54 changed files with 654 additions and 502 deletions
|
|
@ -52,7 +52,7 @@ import {
|
|||
getThreadsFlagValue,
|
||||
initializeEnvironment,
|
||||
isHostedRunner,
|
||||
UserError,
|
||||
ConfigurationError,
|
||||
wrapError,
|
||||
checkActionVersion,
|
||||
} from "./util";
|
||||
|
|
@ -317,7 +317,7 @@ async function run() {
|
|||
await sendStatusReport(
|
||||
await createStatusReportBase(
|
||||
"init",
|
||||
error instanceof UserError ? "user-error" : "aborted",
|
||||
error instanceof ConfigurationError ? "user-error" : "aborted",
|
||||
startedAt,
|
||||
await checkDiskUsage(),
|
||||
error.message,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue