Skip to content

Commit

Permalink
docs: add information about error while retry attempts (#6276)
Browse files Browse the repository at this point in the history
- I noticed this while I was trying to use useQuery and trying to capture the error property.
I think this is something which can be added as extra information for those who will be using it for first time.
  • Loading branch information
dnyaneshwar2023 committed Nov 1, 2023
1 parent 17661f6 commit 20bd905
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/react/guides/query-retries.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ const result = useQuery({

[//]: # 'Example'

> Info: Contents of the `error` property will be part of `failureReason` response property of `useQuery` until the last retry attempt. So in above example any error contents will be part of `failureReason` property for first 9 retry attempts (Overall 10 attempts) and finally they will be part of `error` after last attempt if error persists after all retry attempts.
## Retry Delay

By default, retries in TanStack Query do not happen immediately after a request fails. As is standard, a back-off delay is gradually applied to each retry attempt.
Expand Down

0 comments on commit 20bd905

Please sign in to comment.