Skip to content

Commit 7d1263b

Browse files
committed
fix: improve ContextError messages for trial commands
Pass the usage example with placeholder as the command arg (e.g., 'sentry trial list <org>') instead of the bare command. Use default alternatives (DSN detection, SENTRY_ORG env var) instead of overriding with just the positional syntax. Before: Organization is required. Specify it using: sentry trial list Or: - sentry trial list <org> After: Organization is required. Specify it using: sentry trial list <org> Or: - Run from a directory with a Sentry-configured project - Set SENTRY_ORG and SENTRY_PROJECT (or SENTRY_DSN) environment variables
1 parent b4f1ad2 commit 7d1263b

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/commands/trial/list.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,7 @@ export const listCommand = buildCommand({
231231
});
232232

233233
if (!resolved) {
234-
throw new ContextError("Organization", "sentry trial list", [
235-
"sentry trial list <org>",
236-
]);
234+
throw new ContextError("Organization", "sentry trial list <org>");
237235
}
238236

239237
const info = await getCustomerTrialInfo(resolved.org);

src/commands/trial/start.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,7 @@ export const startCommand = buildCommand({
125125
});
126126

127127
if (!resolved) {
128-
throw new ContextError("Organization", "sentry trial start", [
129-
"sentry trial start <name> <org>",
130-
]);
128+
throw new ContextError("Organization", "sentry trial start <name> <org>");
131129
}
132130

133131
const orgSlug = resolved.org;

0 commit comments

Comments
 (0)