Describe the bug#
The docs on the retry query option for the callback variant do not spell out that failureCount starts at zero. It was a bit surprising and it would nice to call that out, assuming it's intentional. The first retry check will have failureCount === 0.
Your minimal, reproducible example#
https://tanstack.com/query/latest/docs/framework/react/reference/useQuery
Steps to reproduce#
none
Expected behavior#
I expected the docs to document that failureCount is 0 on the first callback and not 1.
How often does this bug happen?#
None
Screenshots or Videos#
No response
Platform#
all
Tanstack Query adapter#
None
TanStack Query version#
v5
TypeScript version#
No response
Additional context#
No response
I actually think this might be a bug. It should be 1 on the first callback. We already have an
error, so thefailureCountshouldn’t be zero 😅