Check for errors in the analysis status response.
This commit is contained in:
parent
823bb21bbb
commit
e0b9b9a248
3 changed files with 8 additions and 1 deletions
3
lib/upload-lib.js
generated
3
lib/upload-lib.js
generated
|
|
@ -294,6 +294,9 @@ async function uploadFiles(sarifFiles, repositoryNwo, commitOid, ref, analysisKe
|
|||
if (status === "complete") {
|
||||
break;
|
||||
}
|
||||
else if (status === "failed") {
|
||||
throw new Error(`Code Scanning could not process the submitted SARIF file:\n${response.data.errors}`);
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
if (util.isHTTPError(e)) {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -440,6 +440,10 @@ async function uploadFiles(
|
|||
logger.info(`Analysis upload status is ${status}.`);
|
||||
if (status === "complete") {
|
||||
break;
|
||||
} else if (status === "failed") {
|
||||
throw new Error(
|
||||
`Code Scanning could not process the submitted SARIF file:\n${response.data.errors}`
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
if (util.isHTTPError(e)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue