-
Notifications
You must be signed in to change notification settings - Fork 153
Open
Description
Describe the feature
There are situations when we need to retry the request based on the special code returned by the API.
I suggest adding support for a callback for retry option, which is a function that takes a fetch context object and count of retries and returns a boolean (true if the request needs to be retried):
await $fetch('/cart', {
retry: (ctx, count) => {
return count <= 3 && ctx.error.code === '007'
}
})Additional information
- Would you be willing to help implement this feature?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels