You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Throwing error from streamedQuery does not update query's error #10038
I tested the repro and noticed that the error does appear, but only after a delay.
This seems to be due to React Query’s default retry behavior (retry: 3 with backoff). While retries are ongoing, the query remains in a fetching state, so query.error isn’t set yet. After retries complete, the error is reported.
Disabling retries (retry: false) makes the error show up immediately.
Based on this, the observed behavior seems consistent with default retry semantics.
changed the title [-]Throwing error from `queryFn` does not update query's `error`[/-][+]Throwing error from `streamedQuery` does not update query's `error`[/+]on Feb 1, 2026
Activity
jaem0629 commentedon Jan 17, 2026
What exactly does
mean?
After a while, the error appears as Error: Error
I'm guessing, does that mean the error gets updated slowly?
AyushNigam-1 commentedon Feb 1, 2026
I tested the repro and noticed that the error does appear, but only after a delay.
This seems to be due to React Query’s default retry behavior (retry: 3 with backoff). While retries are ongoing, the query remains in a fetching state, so query.error isn’t set yet. After retries complete, the error is reported.
Disabling retries (retry: false) makes the error show up immediately.
Based on this, the observed behavior seems consistent with default retry semantics.
aboqasem commentedon Feb 1, 2026
Thanks for checking. The repro should be updated to match the comment from the original discussion, which is only for streamedQuery. Updated.
[-]Throwing error from `queryFn` does not update query's `error`[/-][+]Throwing error from `streamedQuery` does not update query's `error`[/+]orisha-prouxel commentedon Feb 6, 2026
I experiment the same problem 👍
TkDodo commentedon Mar 18, 2026
the issue is a combination of things:
initialData.refetchMode: 'reset', which resets data to undefined upon refetchesinitialDatabecause withinitialData, we never expectundefineddata in the cache.the problem is likely at step 2.
refetchMode: 'reset'needs to respect initialData.