Setting cache data to undefined on error in useQuery - TanStack