Optional
maxOptional
onfunction that will be called if an error is thrown while calling the rest of the middleware chain, and should return whether the error should be retried
Optional
onfunction that will be called whenever a response is received, and should return whether the response is valid (i.e. should be returned and not retried)
Optional
onfunction that will be called before a retry is attempted, and can be used to modify the request before proceeding
current retry attempt (starts at 0)
Optional
retrydelay between retries
Optional
returnif true, the last response will be returned if the number of retries is exceeded instead of throwing RetriesExceededError
Optional
skipfunction that will be called before starting the retry loop. if it returns false, the retry loop will be skipped and the error will be thrown immediately
max number of retries