Add UserError
This commit adds a `UserError` class that should be thrown when the cause of an error is fundamentally from user configuration. When sending status reports, avoid sending a `failure` for `UserError`s. This will prevent our diagnostics from pinging us for errors outside of our control.
This commit is contained in:
parent
040feefecf
commit
3d93bb2ac9
21 changed files with 96 additions and 34 deletions
2
lib/init-action.js
generated
2
lib/init-action.js
generated
|
|
@ -145,7 +145,7 @@ async function run() {
|
|||
catch (error) {
|
||||
core.setFailed(String(error));
|
||||
console.log(error);
|
||||
await (0, actions_util_1.sendStatusReport)(await (0, actions_util_1.createStatusReportBase)("init", "failure", startedAt, String(error), error instanceof Error ? error.stack : undefined));
|
||||
await (0, actions_util_1.sendStatusReport)(await (0, actions_util_1.createStatusReportBase)("init", (0, actions_util_1.getActionsStatus)(error), startedAt, String(error), error instanceof Error ? error.stack : undefined));
|
||||
return;
|
||||
}
|
||||
await sendSuccessStatusReport(startedAt, config, toolsVersion);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue