exotic-emerald
exotic-emerald12mo 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.ai12mo 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.ai12mo 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.ai12mo ago
<@689885255921827855> kapa.ai is still learning and improving, please let us how it did by reacting below
metropolitan-bronze
metropolitan-bronze12mo 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 ...
exotic-emerald
exotic-emerald12mo ago
Thanks, @juncture So, this means I'll have to rewrite the query provider. Makes sense, thank you
metropolitan-bronze
metropolitan-bronze12mo ago
You don't have to rewrite all logic. In App.tsx, you can define defaultQueryOptions.
metropolitan-bronze
metropolitan-bronze12mo ago
No description
metropolitan-bronze
metropolitan-bronze12mo ago
@metammodern
exotic-emerald
exotic-emerald12mo ago
Amazing, thanks for the code @juncture !