Retry requests on some classes of error
Rename `retries` to `retriesLeft`