Error when requested amount exceeds what is allowed The request that raised this error should be retried after waiting the time specified by ``retry_time``. :type requested_amt: int :param requested_amt: The originally requested byte amount :type retry_time
(self, requested_amt, retry_time)
| 16 | |
| 17 | class RequestExceededException(Exception): |
| 18 | def __init__(self, requested_amt, retry_time): |
| 19 | """Error when requested amount exceeds what is allowed |
| 20 | |
| 21 | The request that raised this error should be retried after waiting |
| 22 | the time specified by ``retry_time``. |
| 23 | |
| 24 | :type requested_amt: int |
| 25 | :param requested_amt: The originally requested byte amount |
| 26 | |
| 27 | :type retry_time: float |
| 28 | :param retry_time: The length in time to wait to retry for the |
| 29 | requested amount |
| 30 | """ |
| 31 | self.requested_amt = requested_amt |
| 32 | self.retry_time = retry_time |
| 33 | msg = f'Request amount {requested_amt} exceeded the amount available. Retry in {retry_time}' |
| 34 | super().__init__(msg) |
| 35 | |
| 36 | |
| 37 | class RequestToken: |