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
4
lib/analyze-action.js
generated
4
lib/analyze-action.js
generated
|
|
@ -37,9 +37,7 @@ const util_1 = require("./util");
|
|||
// eslint-disable-next-line import/no-commonjs
|
||||
const pkg = require("../package.json");
|
||||
async function sendStatusReport(startedAt, config, stats, error) {
|
||||
const status = (stats === null || stats === void 0 ? void 0 : stats.analyze_failure_language) !== undefined || error !== undefined
|
||||
? "failure"
|
||||
: "success";
|
||||
const status = actionsUtil.getActionsStatus(error, stats === null || stats === void 0 ? void 0 : stats.analyze_failure_language);
|
||||
const statusReportBase = await actionsUtil.createStatusReportBase("finish", status, startedAt, error === null || error === void 0 ? void 0 : error.message, error === null || error === void 0 ? void 0 : error.stack);
|
||||
const statusReport = {
|
||||
...statusReportBase,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue