You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
after reading the documentation, I wanted to use retry in my requests. I was confused as to why retries was not happening.
Digging around, I've found this issue #109 which states that retries occurs if response code is included in list of retryStatusCodes.
I suggest adding an explanation in which cases retries occurs to avoid confusion.
Code block
// https://developer.mozilla.org/en-US/docs/Web/HTTP/StatusconstretryStatusCodes=newSet([408,// Request Timeout409,// Conflict425,// Too Early429,// Too Many Requests500,// Internal Server Error502,// Bad Gateway503,// Service Unavailable504// Gateway Timeout])...if(retries>0&&retryStatusCodes.has(responseCode)){return$fetchRaw(ctx.request,{
...ctx.options,retry: retries-1})}
Additional information
Would you be willing to help implement this feature?
The text was updated successfully, but these errors were encountered:
picunada
added a commit
to picunada/ofetch
that referenced
this issue
Aug 16, 2023
Describe the Improvement
Hello,
after reading the documentation, I wanted to use retry in my requests. I was confused as to why retries was not happening.
Digging around, I've found this issue #109 which states that retries occurs if response code is included in list of retryStatusCodes.
I suggest adding an explanation in which cases retries occurs to avoid confusion.
Code block
Additional information
The text was updated successfully, but these errors were encountered: