Skip to content
Discussion options

You must be logged in to vote

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

Setting retry = (failureCount, error) => ... allows for custom logic based on why the request failed.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@aak-lear
Comment options

Answer selected by aak-lear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants