How to restart parallel requests and output their error? #8558
Unanswered
alkosorukov
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I uder TanStack Query for react 5.59.15
I need to get a list of cars when I click on a button, replacing the IDs of cities and dealers with their names. Moreover, if an error occurs in the request, I send a new request when I click on the button.
I wrote a simple example(https://codesandbox.io/p/sandbox/v8y3dm) in which one of my parallel queries throws an error. For some reason, parallel requests are not executed.
And the logic of running queries and getting additional data itself doesn't look very good.
How to execute these requests correctly. Maybe we should run all three in parallel? And how to overcome the lack of restarting requests in case of an error? Also, for some reason, errors are not typed.
A similar problem has already been discussed here, but no solution has been found. Since then, there has already been a 4th version of the library, there is no 5th solution.
Beta Was this translation helpful? Give feedback.
All reactions