diff --git a/lib/analyze-action.js b/lib/analyze-action.js index d873c64dc8..c2788900b3 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -94123,6 +94123,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi logger.warning( `Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.` ); + if (isInTestMode()) { + throw e; + } return void 0; } } diff --git a/lib/autobuild-action.js b/lib/autobuild-action.js index 316585f7fd..4cde47d65b 100644 --- a/lib/autobuild-action.js +++ b/lib/autobuild-action.js @@ -79872,6 +79872,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi logger.warning( `Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.` ); + if (isInTestMode()) { + throw e; + } return void 0; } } diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 0c352bbd7b..e138420a3e 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -131599,6 +131599,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi logger.warning( `Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.` ); + if (isInTestMode()) { + throw e; + } return void 0; } } diff --git a/lib/init-action.js b/lib/init-action.js index 8ad9767743..2f509ad0ee 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -90274,6 +90274,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi logger.warning( `Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.` ); + if (isInTestMode()) { + throw e; + } return void 0; } } diff --git a/lib/resolve-environment-action.js b/lib/resolve-environment-action.js index 1413b95935..67cb394e74 100644 --- a/lib/resolve-environment-action.js +++ b/lib/resolve-environment-action.js @@ -79499,6 +79499,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi logger.warning( `Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.` ); + if (isInTestMode()) { + throw e; + } return void 0; } } diff --git a/lib/start-proxy-action.js b/lib/start-proxy-action.js index 1366fbcadf..f262402cf9 100644 --- a/lib/start-proxy-action.js +++ b/lib/start-proxy-action.js @@ -95649,6 +95649,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi logger.warning( `Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.` ); + if (isInTestMode()) { + throw e; + } return void 0; } } diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index 12ad80cd9b..7ad72583b5 100644 --- a/lib/upload-sarif-action.js +++ b/lib/upload-sarif-action.js @@ -89910,6 +89910,9 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi logger.warning( `Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.` ); + if (isInTestMode()) { + throw e; + } return void 0; } } diff --git a/src/status-report.ts b/src/status-report.ts index b0e39aa54b..9bfd14677d 100644 --- a/src/status-report.ts +++ b/src/status-report.ts @@ -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; } } diff --git a/start-proxy/action.yml b/start-proxy/action.yml index 14d2cd1f89..17fc3bbe64 100644 --- a/start-proxy/action.yml +++ b/start-proxy/action.yml @@ -16,6 +16,9 @@ inputs: language: description: The programming language to setup the proxy for the correct ecosystem required: false + matrix: + default: ${{ toJson(matrix) }} + required: false outputs: proxy_host: description: The IP address of the proxy