-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Description
Hey,
When you are using "useQuery" with the parameters:
{ refetchInterval: 1000 }
And the function which fetches the data raises error multiple time (and retrying is being finished), an exception will be thrown without any handling.
How to test it:
- Open the Codesandbox of react-query
- in line 62 change errorRate to be 1
- In line 357 add the refetchInterval property
} = useQuery(["todos", { filter }], fetchTodos, { refetchInterval: 1000 });
- After few seconds the UI will show the unhandled exception
How to fix that:
Basically I think that in query.fetch the in line 366 at "index.js" the "throw error" is causing the issue. I'm not sure why we need to throw that error there so I would like a second eye for that.
Thanks,
Amit.
Metadata
Metadata
Assignees
Labels
No labels