-
How can I immediately handle error on first failed request? When Only when retry attempts is finished, Use caseWhen session is expired, and client send request to backend, there will be an error 401 in the response. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
you can set this is documented here: https://tanstack.com/query/v4/docs/guides/query-retries
|
Beta Was this translation helpful? Give feedback.
you can set
retry
to a function and return false if the error is a 401 error to not retry.this is documented here: https://tanstack.com/query/v4/docs/guides/query-retries