Skip to content

Commit 70b48bc

Browse files
Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 9af6ec4 commit 70b48bc

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

src/upload-lib.ts

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -898,22 +898,15 @@ export async function waitForProcessing(
898898
} else if (options.isUnsuccessfulExecution) {
899899
// We expect a specific processing error for unsuccessful executions, so
900900
// handle these separately.
901-
if (response) {
902-
handleProcessingResultForUnsuccessfulExecution(
903-
response,
904-
status,
905-
logger,
906-
);
907-
}
901+
handleProcessingResultForUnsuccessfulExecution(
902+
response,
903+
status,
904+
logger,
905+
);
908906
break;
909907
} else if (status === "complete") {
910908
break;
911909
} else if (status === "failed") {
912-
if (!response) {
913-
throw new Error(
914-
"Code Scanning could not process the submitted SARIF file: Unable to retrieve error details.",
915-
);
916-
}
917910
const message = `Code Scanning could not process the submitted SARIF file:\n${response.data.errors}`;
918911
const processingErrors = response.data.errors as string[];
919912
throw shouldConsiderConfigurationError(processingErrors)

0 commit comments

Comments
 (0)