diff --git a/src/AuthAwareQueryClientProvider.tsx b/src/AuthAwareQueryClientProvider.tsx index 6459973..32c175b 100644 --- a/src/AuthAwareQueryClientProvider.tsx +++ b/src/AuthAwareQueryClientProvider.tsx @@ -49,6 +49,13 @@ const AuthAwareQueryClientProvider = ({ children }: React.PropsWithChildren) => () => new QueryClient({ defaultOptions: { + mutations: { + onError(error) { + if (error instanceof ExpiredTokenError) { + doRefresh() + } + } + }, queries: { retry(failureCount, error) { if (