Skip to content

Commit

Permalink
Improving handling of uploadFailedSarifResult -> [Object object]
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoref committed May 24, 2023
1 parent bab8747 commit b7d207a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/init-action-post-helper.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/init-action-post-helper.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/init-action-post-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,10 @@ export async function run(
process.env["CODEQL_ACTION_EXPECT_UPLOAD_FAILED_SARIF"] === "true" &&
!uploadFailedSarifResult.raw_upload_size_bytes
) {
let error = JSON.stringify(uploadFailedSarifResult)
throw new Error(
"Expected to upload a failed SARIF file for this CodeQL code scanning run, " +
`but the result was instead ${uploadFailedSarifResult}.`
`but the result was instead ${error}.`
);
}

Expand Down

0 comments on commit b7d207a

Please sign in to comment.