Throw if in test mode

This commit is contained in:
Henry Mercer
2026-01-23 10:40:51 +00:00
parent edebb7861e
commit 91f3460006
9 changed files with 63 additions and 0 deletions
+7
View File
@@ -89845,11 +89845,18 @@ async function sendUnhandledErrorStatusReport(actionName, actionStartedAt, error
);
if (statusReport !== void 0) {
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;
}
}
}