Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scope 500-level errors to components #6442

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions web-admin/src/features/errors/error-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,7 @@ export function createGlobalErrorCallback(queryClient: QueryClient) {
if (onMetricsExplorerPage) {
// Let the Metrics Explorer page handle errors for runtime queries.
// Individual components (e.g. a specific line chart or leaderboard) should display a localised error message.
// NOTE: let's start with 400 errors, but we may want to include 500-level errors too.
if (
isRuntimeQuery(query) &&
(error.response?.status === 400 || error.response?.status === 429)
) {
return;
}
if (isRuntimeQuery(query)) return;

// If a dashboard wasn't found, let +page.svelte handle the error.
// Because the project may be reconciling, in which case we want to show a loading spinner not a 404.
Expand Down
Loading