Consistently wrap errors
This commit is contained in:
parent
555b602b2f
commit
e5c2f32a9f
39 changed files with 145 additions and 122 deletions
|
|
@ -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}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue