Skip to content

Commit

Permalink
Merge pull request #1067 from chromaui/jmhobbs/cap-2250-clean-up-erro…
Browse files Browse the repository at this point in the history
…rs-reported

Do not capture config/option exceptions
  • Loading branch information
jmhobbs authored Oct 1, 2024
2 parents 980e0c1 + 2e7250d commit b4fc0bf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions node-src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ export async function runAll(ctx: InitialContext) {
ctx.log.info('');

const onError = (err: Error | Error[]) => {
Sentry.captureException(err);
ctx.log.info('');
ctx.log.error(fatalError(ctx, [err].flat()));
ctx.extraOptions?.experimental_onTaskError?.(ctx, {
Expand Down Expand Up @@ -198,7 +197,10 @@ export async function runAll(ctx: InitialContext) {
}

// Run these in parallel; neither should ever reject
await Promise.all([runBuild(ctx), checkForUpdates(ctx)]).catch(onError);
await Promise.all([runBuild(ctx), checkForUpdates(ctx)]).catch((error) => {
Sentry.captureException(error);
onError(error);
});

if (!isE2EBuild(ctx.options) && [0, 1].includes(ctx.exitCode)) {
await checkPackageJson(ctx);
Expand Down

0 comments on commit b4fc0bf

Please sign in to comment.