mirror of
https://github.com/netbirdio/dashboard.git
synced 2026-09-23 00:30:43 -07:00
* Show management API request id in error notifications Newer management servers return an X-Request-Id header on every response, including errors. Surface it in the error toast so it can be quoted in support tickets. - api.tsx: read X-Request-Id from the response and attach it to the rejected ErrorResponse (both the JSON-body and status-text paths). - Notification.tsx: render a copyable "Request ID" line whenever an error carries one, covering the promise-based mutation notifications. - ErrorBoundary.tsx: thread the request id through for GET/fetch errors. The line is only shown when the header is present, so older servers that do not send it are unaffected. Adds an e2e spec covering both cases. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016B2yLBeDK3kvX2FvhqcWk8 * docs: add request-id error toast screenshots for PR Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016B2yLBeDK3kvX2FvhqcWk8 * test: expose X-Request-Id via CORS in e2e mock The dashboard reads the request id from a cross-origin response, so the browser only surfaces the header to JS when the response lists it in Access-Control-Expose-Headers. Mirror a CORS-enabled management server in the mock so the test exercises the dashboard logic rather than the header being filtered out cross-origin. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016B2yLBeDK3kvX2FvhqcWk8 * test: assert error toast via data-testid instead of text Add a notification-title testid to the toast and target it with getByTestId in the request-id spec, following the repo convention of selecting by data-testid rather than brittle visible text. --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
23 KiB
896x168px
23 KiB
896x168px