mirror of
https://github.com/github/codeql-action.git
synced 2026-10-30 01:27:22 +00:00
Throw if in test mode
This commit is contained in:
@@ -630,10 +630,17 @@ export async function sendUnhandledErrorStatusReport(
|
||||
);
|
||||
if (statusReport !== undefined) {
|
||||
await sendStatusReport(statusReport);
|
||||
} else if (isInTestMode()) {
|
||||
throw new Error(
|
||||
"Failed to create status report for unhandled error in test mode.",
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
logger.warning(
|
||||
`Failed to send the error status report: ${getErrorMessage(e)}.`,
|
||||
);
|
||||
if (isInTestMode()) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user