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
|
|
@ -485,23 +485,17 @@ export async function waitForProcessing(
|
|||
logger.info(`Analysis upload status is ${status}.`);
|
||||
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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue