You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cli) - Don't frame clear user-actionable errors as bugs to report
A clear 4xx API response (validation error, not-found, not-enabled, conflict)
or bad command input was printed through the top-level handler's bug-report
path, appending a Correlation ID and "share this with BigCommerce support" to
an already-actionable message.
Add a reusable UserActionableError base class that the top-level handler prints
plainly (UnauthorizedError now extends it). Adopt it across the API clients for
their 4xx / input-validation cases:
- domains: 4xx responses, "API not enabled", ownership-verification errors
- project: validation errors, "not enabled", project-not-found
- logs: "not enabled", project-not-found, invalid query, bad time-window input
- channel: channel-site auth/scope failures
- auth/login: missing or unvalidatable credentials
5xx server-side failures and unexpected errors stay plain Errors and keep the
Correlation ID + support framing.
Refs LTRAC-1115
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Stop framing clear, user-actionable CLI errors as bugs to report. Validation errors, not-found and not-enabled responses, conflicts, and bad command input now print just the message and exit, instead of appending a Correlation ID and a "share this with BigCommerce support" prompt. That framing is now reserved for genuine server-side (5xx) failures and unexpected errors. Applies across the `domains`, `project`, `channel`, `logs`, and `auth` commands via a shared `UserActionableError` type.
Copy file name to clipboardExpand all lines: packages/catalyst/src/cli/lib/channels.ts
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
import{z}from'zod';
2
2
3
3
import{assertAuthorized}from'./auth-errors';
4
+
import{UserActionableError}from'./errors';
4
5
import{getTelemetry}from'./telemetry';
5
6
6
7
// `origin` is the CLI-API gateway (configured via `--cli-api-origin`, default
@@ -239,7 +240,7 @@ export async function updateChannelSiteUrl(
239
240
);
240
241
241
242
if(response.status===401||response.status===403){
242
-
thrownewError(
243
+
thrownewUserActionableError(
243
244
`Failed to update channel site (${response.status}). Re-run \`catalyst auth login\` to refresh your access token with the store_channel_settings scope.`,
0 commit comments