useQuery - data and error not updating with refetch

I have a query like this,

const { data, error, refetch } = useQuery<{ me }>(QUERY, { fetchPolicy: "network-only", nextFetchPolicy: "network-only" })

When I call refetch and the API returns an error, both data and error don’t update. error is null, and data holds the values from the last successful fetch. But the promise returned from refetch rejects with the error. Is that the intended behavior? If so, how do I get data to clear when the api returns an error?