1The Retry middleware automatically retries requests that fail due to 2intermittent client or server errors (such as network hiccups). By default, it 3retries 2 times and handles only timeout exceptions. It can be configured with 4an arbitrary number of retries, a list of exceptions to handle, a retry 5interval, a percentage of randomness to add to the retry interval, and a backoff 6factor. The middleware can also handle the Retry-After header automatically when 7configured with the right status codes. 8