Skip to content

fix(dashboard): show actionable error messages instead of raw API errors#592

Merged
BYK merged 1 commit intomainfrom
fix/dashboard-actionable-errors
Mar 27, 2026
Merged

fix(dashboard): show actionable error messages instead of raw API errors#592
BYK merged 1 commit intomainfrom
fix/dashboard-actionable-errors

Conversation

@BYK
Copy link
Copy Markdown
Member

@BYK BYK commented Mar 27, 2026

Summary

  • Add shared enrichDashboardError() helper that converts raw 404/403/400 API errors into ResolutionError instances with actionable suggestions
  • Wire into all dashboard API calls across list, view, create, and widget add/edit/delete commands
  • Add 9 unit tests covering each error status code mapping

Before:

Error: API request failed: 404 Not Found
  Endpoint: /organizations/my-org/dashboards/

After:

Organization 'my-org' not found or has no dashboards.

Try:
  sentry dashboard list <org>/

Or:
  - Verify the organization slug with: sentry org list
  - Check that you have access to the organization

Closes #448

Add a shared `enrichDashboardError()` helper in resolve.ts that converts
raw 404/403/400 ApiError responses into ResolutionError instances with
actionable suggestions (org not found, dashboard not found, access denied,
invalid widget config).

Wire the helper into all dashboard API calls across list, view, create,
and widget add/edit/delete commands using `.catch()`.

Closes #448
@github-actions
Copy link
Copy Markdown
Contributor

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (init) Surface server-provided detail in spinner messages by MathurAditya724 in #588
  • AsyncIterable streaming support for library SDK by BYK in #586

Bug Fixes 🐛

  • (auth) Skip stale cached user info for env var tokens in auth status by BYK in #589
  • (dashboard) Show actionable error messages instead of raw API errors by BYK in #592
  • (upgrade) Move delta patch log.info outside spinner callback by BYK in #590

Internal Changes 🔧

  • Regenerate skill files and command docs by github-actions[bot] in 0276f760

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

Codecov Results 📊

126 passed | Total: 126 | Pass Rate: 100% | Execution Time: 0ms

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 1265 uncovered lines.
✅ Project coverage is 95.67%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    95.66%    95.67%    +0.01%
==========================================
  Files          202       202         —
  Lines        29143     29233       +90
  Branches         0         0         —
==========================================
+ Hits         27878     27968       +90
- Misses        1265      1265         —
- Partials         0         0         —

Generated by Codecov Action

@BYK BYK marked this pull request as ready for review March 27, 2026 14:40
@BYK BYK merged commit f57249b into main Mar 27, 2026
22 checks passed
@BYK BYK deleted the fix/dashboard-actionable-errors branch March 27, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(dashboard): show actionable error messages instead of raw API errors

1 participant