Skip to content

Commit

Permalink
fix(analytics): remove query error tracking, too many events
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranjamie committed Jul 17, 2024
1 parent 52a6fb2 commit f3de110
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/app/common/persistence.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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] ?? '';
Expand Down

0 comments on commit f3de110

Please sign in to comment.