useSuspenseQuery returns last error instead of fresh data
Hey 👋🏽 ,
I need some help. I'm using TanStack Router with TanstackQuery and want to make use of useSuspenseQuery. The problem is that the last error (401) that led to a login is also returned the 1st time after a successful login by useSuspenseQuery, without requesting the resource.
Do you know, how to solve this? How can I ensure that this response, which leads to the login, does not end up in the QueryCache in the first place?
Thanks

0 Replies