Skip to content

Commit 7fb8378

Browse files
committed
Re-throw exception in createStatusReportBase when in test mode
1 parent 65e9e64 commit 7fb8378

File tree

8 files changed

+27
-0
lines changed

8 files changed

+27
-0
lines changed

lib/analyze-action.js

Lines changed: 3 additions & 0 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: 3 additions & 0 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: 3 additions & 0 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: 3 additions & 0 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: 3 additions & 0 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: 3 additions & 0 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: 3 additions & 0 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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,12 @@ export async function createStatusReportBase(
375375
logger.warning(
376376
`Caught an exception while gathering information for telemetry: ${e}. Will skip sending status report.`,
377377
);
378+
379+
// Re-throw the exception in test mode. While testing, we want to know if something goes wrong here.
380+
if (isInTestMode()) {
381+
throw e;
382+
}
383+
378384
return undefined;
379385
}
380386
}

0 commit comments

Comments
 (0)