diff --git a/src/utils/trpc.ts b/src/utils/trpc.ts index e0b0a2f5..dd1cd8e9 100644 --- a/src/utils/trpc.ts +++ b/src/utils/trpc.ts @@ -60,8 +60,7 @@ const isErrorRetryableOnClient = (error: unknown): boolean => { if (typeof window === 'undefined') return true if (!(error instanceof TRPCClientError)) return true const res = TRPCWithErrorCodeSchema.safeParse(error) - if (res.success && NON_RETRYABLE_ERROR_CODES.has(res.data)) return false - return true + return !res.success || !NON_RETRYABLE_ERROR_CODES.has(res.data) } /**