mirror of
https://github.com/github/codeql-action.git
synced 2026-04-29 02:18:47 +00:00
Re-throw exception in createStatusReportBase when in test mode
This commit is contained in:
@@ -375,6 +375,12 @@ export async function createStatusReportBase(
|
||||
logger.warning(
|
||||
`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`,
|
||||
);
|
||||
|
||||
// Re-throw the exception in test mode. While testing, we want to know if something goes wrong here.
|
||||
if (isInTestMode()) {
|
||||
throw e;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user