Re-throw exception in createStatusReportBase when in test mode

This commit is contained in:
Michael B. Gale
2025-10-03 11:59:36 +01:00
parent 65e9e640ee
commit 7fb8378d93
8 changed files with 27 additions and 0 deletions
+6
View File
@@ -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;
}
}