Persisting error state in react-query until successful refetch - TanStack