Skip to content

Commit 529c266

Browse files
committed
Use getErrorMessage in more places
1 parent 6bd84b6 commit 529c266

File tree

9 files changed

+45
-27
lines changed

9 files changed

+45
-27
lines changed

lib/analyze-action.js

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/autobuild-action.js

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action-post.js

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action.js

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/resolve-environment-action.js

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/setup-codeql-action.js

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/start-proxy-action.js

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-sarif-action.js

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/status-report.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,9 @@ export async function createStatusReportBase(
321321
try {
322322
statusReport.actions_event_name = getWorkflowEventName();
323323
} catch (e) {
324-
logger.warning(`Could not determine the workflow event name: ${e}.`);
324+
logger.warning(
325+
`Could not determine the workflow event name: ${getErrorMessage(e)}.`,
326+
);
325327
}
326328

327329
if (config) {
@@ -374,7 +376,7 @@ export async function createStatusReportBase(
374376
return statusReport;
375377
} catch (e) {
376378
logger.warning(
377-
`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`,
379+
`Failed to gather information for telemetry: ${getErrorMessage(e)}. Will skip sending status report.`,
378380
);
379381

380382
// Re-throw the exception in test mode. While testing, we want to know if something goes wrong here.
@@ -629,7 +631,7 @@ export async function sendUnhandledErrorStatusReport(
629631
}
630632
} catch (e) {
631633
logger.warning(
632-
`Caught an exception while sending the error status report: ${e}.`,
634+
`Failed to send the error status report: ${getErrorMessage(e)}.`,
633635
);
634636
}
635637
}

0 commit comments

Comments
 (0)