Allow client requests to be retried (#11464)

This is regarding: https://github.com/psf/requests/issues/4664

The change allows errors to be handled and retried.

Co-authored-by: Mayur Singal <39544459+ulixius9@users.noreply.github.com>
This commit is contained in:
Noe Alejandro Perez Dominguez 2023-05-08 08:31:55 +02:00 committed by GitHub
parent 758cabc035
commit b9aef4156f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -216,8 +216,8 @@ class REST:
Returns the body json in the 200 status.
"""
retry_codes = self._retry_codes
resp = self._session.request(method, url, **opts)
try:
resp = self._session.request(method, url, **opts)
resp.raise_for_status()
except HTTPError as http_error:
# retry if we hit Rate Limit