mirror of
https://github.com/github/codeql-action.git
synced 2026-04-13 01:55:49 +00:00
Merge pull request #1790 from github/henrymercer/aborted-user-error
Report user errors in the abort stage appropriately
This commit is contained in:
2
lib/init-action.js
generated
2
lib/init-action.js
generated
@@ -154,7 +154,7 @@ async function run() {
|
||||
catch (unwrappedError) {
|
||||
const error = (0, util_1.wrapError)(unwrappedError);
|
||||
core.setFailed(error.message);
|
||||
await (0, actions_util_1.sendStatusReport)(await (0, actions_util_1.createStatusReportBase)("init", "aborted", startedAt, error.message, error.stack));
|
||||
await (0, actions_util_1.sendStatusReport)(await (0, actions_util_1.createStatusReportBase)("init", error instanceof util_1.UserError ? "user-error" : "aborted", startedAt, error.message, error.stack));
|
||||
return;
|
||||
}
|
||||
try {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -40,6 +40,7 @@ import {
|
||||
getThreadsFlagValue,
|
||||
initializeEnvironment,
|
||||
isHostedRunner,
|
||||
UserError,
|
||||
wrapError,
|
||||
} from "./util";
|
||||
import { validateWorkflow } from "./workflow";
|
||||
@@ -302,7 +303,7 @@ async function run() {
|
||||
await sendStatusReport(
|
||||
await createStatusReportBase(
|
||||
"init",
|
||||
"aborted",
|
||||
error instanceof UserError ? "user-error" : "aborted",
|
||||
startedAt,
|
||||
error.message,
|
||||
error.stack
|
||||
|
||||
Reference in New Issue
Block a user