Handle API versions that reject unsuccessful executions
This commit is contained in:
parent
122b180b66
commit
37b4358e44
3 changed files with 27 additions and 7 deletions
|
|
@ -67,11 +67,21 @@ async function uploadFailedSarif(
|
|||
logger
|
||||
);
|
||||
if (uploadResult !== undefined && waitForProcessing) {
|
||||
await uploadLib.waitForProcessing(
|
||||
repositoryNwo,
|
||||
uploadResult.sarifID,
|
||||
logger
|
||||
);
|
||||
try {
|
||||
await uploadLib.waitForProcessing(
|
||||
repositoryNwo,
|
||||
uploadResult.sarifID,
|
||||
logger
|
||||
);
|
||||
} catch (e) {
|
||||
if (e instanceof Error && e.message.includes("unsuccessful execution")) {
|
||||
logger.info(
|
||||
"Submitting a SARIF file for the failed run isn't yet supported, continuing."
|
||||
);
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue