From fe1c758191bcc9eef716df5b471e36bb71c8f78b Mon Sep 17 00:00:00 2001 From: Eric P Green Date: Thu, 16 Jan 2025 09:26:38 -0500 Subject: [PATCH] Scope 500-level errors to components --- web-admin/src/features/errors/error-utils.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/web-admin/src/features/errors/error-utils.ts b/web-admin/src/features/errors/error-utils.ts index 9f248c03cdb..35eeb61ac0d 100644 --- a/web-admin/src/features/errors/error-utils.ts +++ b/web-admin/src/features/errors/error-utils.ts @@ -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.