-
-
Couldn't load subscription status.
- Fork 3.5k
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomersworks as designed
Description
Describe the bug
When throwing an error from a useSuspenseQuery like described here resetting the QueryErrorResetBoundary does not reset the error in useSuspenseQuery.
This happens when the error occurs on a subsequent fetch. It works as expected, if the error occurs while fetching data initially.
Your minimal, reproducible example
https://stackblitz.com/edit/github-vmd3m2?file=src%2Fcomponents%2FProjects.jsx
Steps to reproduce
- Click on "Show Projects"
- Click on "Refresh"
- Click on "Try again"
- The
ErrorBoundaryfallback is still shown
Expected behavior
After 3. the Suspense fallback should be shown and after a short while the project list should be shown.
How often does this bug happen?
Everytime
Screenshots or Videos
query-suspense-error-handling.mov
No response
Platform
- OS: MacOS 14.4.1
- Browser: Chrome 124.0.6367.209
Tanstack Query adapter
react-query
TanStack Query version
5.37.1
TypeScript version
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomersworks as designed