Skip to content

Commit b319fdc

Browse files
committed
Retry exceptions.TooManyRequestsError
1 parent 6ea0dc8 commit b319fdc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pipedrive/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@ def _request(self, method, url, headers=None, params=None, **kwargs):
140140
return response
141141
except (exceptions.BadRequestError, exceptions.UnauthorizedError, exceptions.NotFoundError,
142142
exceptions.UnsupportedMediaTypeError, exceptions.UnprocessableEntityError,
143-
exceptions.NotImplementedError, exceptions.TooManyRequestsError) as e:
143+
exceptions.NotImplementedError) as e:
144144
# Do not retry, just return the response.
145145
raise e
146146
except (exceptions.ForbiddenError, exceptions.InternalServerError, exceptions.ServiceUnavailableError,
147-
exceptions.UnknownError):
147+
exceptions.UnknownError, exceptions.TooManyRequestsError):
148148
# Retry! There is hope.
149149
number_of_retries -= 1
150150
time.sleep(intervaltime / 1000.0)

0 commit comments

Comments
 (0)