What controls the behaviour of request backoff?
I see request retries but I don't know what controls them. I basically want to disable retries for 404 responses, cause they don't hve much sense. I'm suing refine v3.18
9 Replies
Hi @metammodern. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Hmm, I don't know enough to give you a confident answer yet. However, you can refer to the refine documentation (https://refine.dev/docs) for more information on handling retries and other configurations.
----------------------
Note: you can ask me a follow up question by @ mentioning me again
:speech_balloon:
----------------------Overview | refine
What is refine?
<@689885255921827855> kapa.ai is still learning and improving, please let us how it did by reacting below
quickest-silver•17mo ago
Hi @metammodern,
I think you should look Tanstack React Query. Retry mechanism managed from there.
I dropped link, you can check it: https://tanstack.com/query/v4/docs/react/guides/query-retries
Query Retries | TanStack Query Docs
When a useQuery query fails (the query function throws an error), TanStack Query will automatically retry the query if that query's request has not reached the max number of consecutive retries (defaults to 3) or a function is provided to determine if a retry is allowed.
You can configure retries both on a global level and an individual query ...
rare-sapphire•17mo ago
Thanks, @juncture
So, this means I'll have to rewrite the query provider. Makes sense, thank you
quickest-silver•17mo ago
You don't have to rewrite all logic. In App.tsx, you can define defaultQueryOptions.
quickest-silver•17mo ago
quickest-silver•17mo ago
@metammodern
rare-sapphire•17mo ago
Amazing, thanks for the code @juncture !