Skip to content

Commit 77e98a3

Browse files
betegonclaude
andcommitted
fix(init): capture exceptions in team resolution failures to Sentry
Both the team auto-creation failure (403) and the listTeams API error are now reported via captureException with org/context metadata, even when the error is the user's fault — helps track onboarding friction. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 48aa2f6 commit 77e98a3

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/lib/init/wizard-runner.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,10 @@ async function resolvePreSpinnerOptions(
422422
try {
423423
const created = await createTeam(opts.org, teamSlug);
424424
opts = { ...opts, team: created.slug };
425-
} catch {
425+
} catch (err) {
426+
captureException(err, {
427+
extra: { orgSlug: opts.org, teamSlug, context: "auto-create team" },
428+
});
426429
const teamsUrl = `${getSentryBaseUrl()}/settings/${opts.org}/teams/`;
427430
log.error(
428431
"No teams in your organization.\n" +
@@ -460,8 +463,10 @@ async function resolvePreSpinnerOptions(
460463
opts = { ...opts, team: selected };
461464
}
462465
}
463-
} catch {
464-
// Best-effort — let resolveOrCreateTeam handle it later
466+
} catch (err) {
467+
captureException(err, {
468+
extra: { orgSlug: opts.org, context: "early team resolution" },
469+
});
465470
}
466471
}
467472

0 commit comments

Comments
 (0)