Consistently wrap errors

This commit is contained in:
Henry Mercer 2023-04-06 17:04:21 +01:00
parent 555b602b2f
commit e5c2f32a9f
39 changed files with 145 additions and 122 deletions

View file

@ -7,13 +7,15 @@ import * as core from "@actions/core";
import * as analyzeActionPostHelper from "./analyze-action-post-helper";
import * as debugArtifacts from "./debug-artifacts";
import { wrapError } from "./util";
async function runWrapper() {
try {
await analyzeActionPostHelper.run(debugArtifacts.uploadSarifDebugArtifact);
} catch (error) {
core.setFailed(`analyze post-action step failed: ${error}`);
console.log(error);
core.setFailed(
`analyze post-action step failed: ${wrapError(error).message}`
);
}
}