From 5e4e5c683bda11d6e612a81a0387e1136a620017 Mon Sep 17 00:00:00 2001 From: "cru-self-healing-agent[bot]" <318792136+cru-self-healing-agent[bot]@users.noreply.github.com> Date: Mon, 31 Aug 2026 17:35:00 +0000 Subject: [PATCH] Stop surfacing cancelled-request AbortErrors as user-facing failures The global Apollo onError link in client.ts treated every networkError identically, including fetch AbortErrors raised whenever a request is cancelled by navigation, component unmount, or a superseded/batched query. That's normal SPA behavior, not an API failure, but it still showed the raw browser message "The user aborted a request." in an error snackbar and reported it to RUM as a network error via reportNetworkError/addDatadogError. Co-Authored-By: Claude --- src/lib/apollo/client.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lib/apollo/client.ts b/src/lib/apollo/client.ts index 7c46b5bca..0985227bf 100644 --- a/src/lib/apollo/client.ts +++ b/src/lib/apollo/client.ts @@ -63,7 +63,15 @@ const makeClient = (apiToken: string) => { } }); - if (networkError) { + // Requests are aborted when a component unmounts or a query is + // superseded (e.g. quick navigation, list virtualization, or a + // batched request sharing an in-flight fetch with one that was + // cancelled). That's expected SPA behavior, not an API failure, so + // don't alarm the user with a raw "The user aborted a request." + // snackbar or count it as a real network error. + const isAbortError = networkError?.name === 'AbortError'; + + if (networkError && !isAbortError) { dispatch('mpdx-api-error'); snackNotifications.error(networkError.message); reportNetworkError(networkError, operation);