wise-white
wise-white14mo ago

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
kapa.ai
kapa.ai14mo ago
Hi @metammodern. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
kapa.ai
kapa.ai14mo ago
---------------------- 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?
kapa.ai
kapa.ai14mo ago
<@689885255921827855> kapa.ai is still learning and improving, please let us how it did by reacting below
rival-black
rival-black14mo 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 ...
wise-white
wise-white14mo ago
Thanks, @juncture So, this means I'll have to rewrite the query provider. Makes sense, thank you
rival-black
rival-black14mo ago
You don't have to rewrite all logic. In App.tsx, you can define defaultQueryOptions.
rival-black
rival-black14mo ago
No description
rival-black
rival-black14mo ago
@metammodern
wise-white
wise-white14mo ago
Amazing, thanks for the code @juncture !