How to show an error message after rolling back and before the invalidateQuery is finished - TanStack