Skip to content
Open
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
10 changes: 9 additions & 1 deletion src/lib/apollo/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading