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/upload-sarif-action.js
generated
2
lib/upload-sarif-action.js
generated
|
|
@ -59,7 +59,7 @@ async function run() {
|
|||
const stack = error instanceof Error ? error.stack : String(error);
|
||||
core.setFailed(message);
|
||||
console.log(error);
|
||||
await actionsUtil.sendStatusReport(await actionsUtil.createStatusReportBase("upload-sarif", "failure", startedAt, message, stack));
|
||||
await actionsUtil.sendStatusReport(await actionsUtil.createStatusReportBase("upload-sarif", actionsUtil.getActionsStatus(error), startedAt, message, stack));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue