Add catch-all error reporting for errors that slip through run

This commit is contained in:
Henry Mercer
2026-01-22 13:14:53 +00:00
parent 14bd76753f
commit 229e0cd749
17 changed files with 447 additions and 101 deletions
+27
View File
@@ -606,3 +606,30 @@ export async function createInitWithConfigStatusReport(
),
};
}
export async function sendUnexpectedErrorStatusReport(
actionName: ActionName,
actionStartedAt: Date,
error: unknown,
logger: Logger,
): Promise<void> {
try {
const statusReport = await createStatusReportBase(
actionName,
"failure",
actionStartedAt,
undefined,
undefined,
logger,
undefined,
getErrorMessage(error),
);
if (statusReport !== undefined) {
await sendStatusReport(statusReport);
}
} catch (e) {
logger.warning(
`Caught an exception while sending the error status report: ${e}.`,
);
}
}