Skip to content

Commit df55458

Browse files
committed
fix: add support contact and simplify type annotation
- Add support@sentry.io mention when trial start fails - Simplify no-op conditional type to plain ReturnType<>
1 parent b17c30b commit df55458

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/lib/seer-trial.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export async function promptAndStartTrial(
7373
const log = logger.withTag("seer");
7474

7575
// 1. Check trial availability (graceful failure → return false)
76-
let trial: ReturnType<typeof findAvailableTrial> extends infer T ? T : never;
76+
let trial: ReturnType<typeof findAvailableTrial>;
7777
try {
7878
const trials = await getProductTrials(orgSlug);
7979
trial = findAvailableTrial(trials, "seer");
@@ -120,6 +120,7 @@ export async function promptAndStartTrial(
120120
"Failed to start trial. Please try again or visit your Sentry settings:"
121121
);
122122
log.warn(` ${buildBillingUrl(orgSlug, "seer")}`);
123+
log.warn("If the problem persists, contact support@sentry.io for help.");
123124
return false;
124125
}
125126
}

test/lib/seer-trial.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ describe("promptAndStartTrial", () => {
242242
);
243243
// Should include a link to billing/settings
244244
expect(logWarnCalls.some((m) => m.includes("sentry.io"))).toBe(true);
245+
// Should mention support contact
246+
expect(logWarnCalls.some((m) => m.includes("support@sentry.io"))).toBe(
247+
true
248+
);
245249
});
246250

247251
test("shows correct context message for not_enabled reason", async () => {

0 commit comments

Comments
 (0)