-
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Summary
Dashboard commands surface raw API error messages ("API request failed: 404 Not Found") that give users no guidance on what went wrong or what to try next. Other commands in the CLI use ContextError and ResolutionError patterns that provide helpful suggestions.
From #406.
Examples
sentry dashboard list
# Error: API request failed: 404 Not Found
# ^ No guidance — should suggest: sentry dashboard list <org>/
sentry dashboard list nonexistent-org/
# Error: API request failed: 404 Not Found
# ^ Should say: Organization 'nonexistent-org' not found
sentry dashboard view 505818
# Error: API request failed: 403 Forbidden
# You do not have permission to perform this action.
# ^ Should suggest checking org membership or specifying a different orgCompare with the good error messages already in the CLI:
sentry dashboard view sentry/ 'nonexistent title'
# Error: No dashboard with title 'nonexistent title' found in 'sentry'.
# Available dashboards:
# 226580 1/12/26 Cache Slowdown
# 41406 abhi test dashboard
# ...Suggested approach
Wrap the API calls in list.ts and view.ts with error handling that catches ApiError and converts 404/403 responses into ResolutionError or ContextError instances with actionable suggestions:
- 404 on list/view: "Organization '{org}' not found or has no dashboards. Try:
sentry dashboard list <org>/" - 403 on view: "No access to dashboard {id}. Try:
sentry dashboard view <org>/ {id}" - 404 on view with numeric ID: "Dashboard {id} not found in '{org}'. Try:
sentry dashboard list <org>/to see available dashboards"
Key files
src/commands/dashboard/list.ts:137-140— API call with no error handlingsrc/commands/dashboard/view.ts:81-90— API calls with no error handlingsrc/lib/errors.ts—ContextError,ResolutionErrorpatterns to follow
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Fields
Give feedbackNo fields configured for issues without a type.