Use getErrorMessage in more places

This commit is contained in:
Henry Mercer
2026-01-23 10:36:25 +00:00
parent 6bd84b6a82
commit 529c266223
9 changed files with 45 additions and 27 deletions
+5 -3
View File
@@ -89728,7 +89728,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi
try {
statusReport.actions_event_name = getWorkflowEventName();
} catch (e) {
logger.warning(`Could not determine the workflow event name: ${e}.`);
logger.warning(
`Could not determine the workflow event name: ${getErrorMessage(e)}.`
);
}
if (config) {
statusReport.languages = config.languages?.join(",");
@@ -89766,7 +89768,7 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi
return statusReport;
} catch (e) {
logger.warning(
`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`
`Failed to gather information for telemetry: ${getErrorMessage(e)}. Will skip sending status report.`
);
if (isInTestMode()) {
throw e;
@@ -89846,7 +89848,7 @@ async function sendUnhandledErrorStatusReport(actionName, actionStartedAt, error
}
} catch (e) {
logger.warning(
`Caught an exception while sending the error status report: ${e}.`
`Failed to send the error status report: ${getErrorMessage(e)}.`
);
}
}