Consider SyntaxErrors configuration errors

This commit is contained in:
Angela P Wen 2024-02-28 15:23:11 +00:00
parent 1a6bac42d0
commit 52f2347108
3 changed files with 7 additions and 3 deletions

3
lib/upload-lib.js generated
View file

@ -162,7 +162,8 @@ async function uploadFromActions(sarifPath, checkoutPath, category, logger, { is
return await uploadFiles(getSarifFilePaths(sarifPath), (0, repository_1.parseRepositoryNwo)(util.getRequiredEnvParam("GITHUB_REPOSITORY")), await actionsUtil.getCommitOid(checkoutPath), await actionsUtil.getRef(), await api.getAnalysisKey(), category, util.getRequiredEnvParam("GITHUB_WORKFLOW"), actionsUtil.getWorkflowRunID(), actionsUtil.getWorkflowRunAttempt(), checkoutPath, actionsUtil.getRequiredInput("matrix"), logger);
}
catch (e) {
if (e instanceof InvalidRequestError && isThirdPartyUpload) {
if ((e instanceof InvalidRequestError || e instanceof SyntaxError) &&
isThirdPartyUpload) {
throw new util_1.ConfigurationError(e.message);
}
throw e;