isError not updated when NextJS API fails
When a request in the NextJS server fails, the
error properties do not update.
This is my QueryClient config:
This is my NextJS page:
This is my PageProtected component:
This is my usePageProtected hook (used in the PageProtected component):
This is my useGetSelfUser (API triggered to fetch user details):
Why the isError does not get updated after the /123 API fails?
I am following this: https://tanstack.com/query/latest/docs/framework/react/guides/query-functions?from=reactQueryV3#usage-with-fetch-and-other-clients-that-do-not-throw-by-default
3 Replies
deep-jade•2y ago
Because of retries
like-goldOP•2y ago
i've removed and it continues to not work.
also, i've set it to 0 and it does not work as well
also, i've set it to false and it does not work
deep-jade•2y ago
Then show a minimal reproduction please