From f3de110f65d0165d9cfef591a1a690b78ad075e3 Mon Sep 17 00:00:00 2001 From: kyranjamie Date: Wed, 17 Jul 2024 15:14:13 +0200 Subject: [PATCH] fix(analytics): remove query error tracking, too many events --- src/app/common/persistence.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/app/common/persistence.ts b/src/app/common/persistence.ts index 400a25538d4..e56eb03e8f8 100644 --- a/src/app/common/persistence.ts +++ b/src/app/common/persistence.ts @@ -1,5 +1,5 @@ import { createAsyncStoragePersister } from '@tanstack/query-async-storage-persister'; -import { MutationCache, QueryCache, QueryClient } from '@tanstack/react-query'; +import { MutationCache, QueryClient } from '@tanstack/react-query'; import { persistQueryClient } from '@tanstack/react-query-persist-client'; import { PERSISTENCE_CACHE_TIME } from '@leather.io/constants'; @@ -19,12 +19,6 @@ const storage = { const chromeStorageLocalPersister = createAsyncStoragePersister({ storage }); export const queryClient = new QueryClient({ - queryCache: new QueryCache({ - async onError(_error, query) { - const queryKey = query.queryKey[0] ?? ''; - void analytics.track('query_error', { queryKey }); - }, - }), mutationCache: new MutationCache({ async onError(_error, _variables, _context, mutation) { const mutationPrefix = mutation?.options.mutationKey?.[0] ?? '';