diff --git a/packages/app/src/lib/trpc/provider.tsx b/packages/app/src/lib/trpc/provider.tsx index 9fe13fd0..3d1bf6c8 100644 --- a/packages/app/src/lib/trpc/provider.tsx +++ b/packages/app/src/lib/trpc/provider.tsx @@ -36,13 +36,14 @@ export default function TrpcProvider({ children }: { children: React.ReactNode } }, }), mutationCache: new MutationCache({ - onError: (error, query) => { - if (testNoDefaultErrorHandling(query)) return + onError: (error, _v, _c, mutation) => { + if (testNoDefaultErrorHandling(mutation)) return handleMutationError(error as TRPCClientErrorLike, dictionary, router) }, }), }) ) + const [trpcClient] = useState(() => trpc.createClient({ transformer: SuperJSON,