Re-enable waiting for processing by default, using the new API semantics.
This commit is contained in:
parent
d8576e34bf
commit
9885f86fab
6 changed files with 13 additions and 26 deletions
16
lib/upload-lib.js
generated
16
lib/upload-lib.js
generated
|
|
@ -322,23 +322,15 @@ async function waitForProcessing(repositoryNwo, sarifID, apiDetails, logger) {
|
|||
if (status === "complete") {
|
||||
break;
|
||||
}
|
||||
else if (status === "pending") {
|
||||
logger.debug("Analysis processing is still pending...");
|
||||
}
|
||||
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)) {
|
||||
switch (e.status) {
|
||||
case 404:
|
||||
logger.debug("Analysis is not found yet...");
|
||||
break; // Note this breaks from the case statement, not the outer loop.
|
||||
default:
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
else {
|
||||
throw e;
|
||||
}
|
||||
logger.warning(`An error occurred checking the status of the delivery. ${e} It should still be processed in the background, but errors that occur during processing may not be reported.`);
|
||||
}
|
||||
await util.delay(STATUS_CHECK_FREQUENCY_MILLISECONDS);
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue