Skip to content

Commit 8245dec

Browse files
authored
fix(dashboard): guard sort param by dataset in widget table queries (#715)
## Summary - Fix `queryWidgetTable` sending `sort` param for non-spans datasets (errors/discover reject with 400 Bad Request) - Enrich `ApiError` captures in `exceptionWhileRunningCommand` with structured Sentry context (`status`, `endpoint`, `detail`) for better diagnostics Fixes CLI-129 ## Details `queryWidgetTimeseries` already correctly guarded the `sort` parameter behind `dataset === "spans"` (lines 384-389), but `queryWidgetTable` was passing `query?.orderby` unconditionally. When a dashboard has a table or big_number widget with `error-events` or `discover` widget type and the widget query has `orderby`, the events endpoint returns 400. The `api_error` context on `Sentry.setContext()` ensures future ApiError events include the endpoint URL and response detail, making it possible to diagnose which API call failed without guessing from minified stack traces.
1 parent cff56b6 commit 8245dec

File tree

4 files changed

+88
-88
lines changed

4 files changed

+88
-88
lines changed

0 commit comments

Comments
 (0)