File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727 RateLimitExceededError ,
2828 ServiceException ,
2929 UnauthorizedException ,
30+ ValidationException ,
3031)
3132
3233logger = logging .getLogger (__name__ )
@@ -174,6 +175,9 @@ async def request(
174175 logger .debug ("response body: %s" , r .data )
175176
176177 if not 200 <= r .status <= 299 :
178+ if r .status == 400 :
179+ raise ValidationException (http_resp = r )
180+
177181 if r .status == 401 :
178182 raise UnauthorizedException (http_resp = r )
179183
Original file line number Diff line number Diff line change 2424 ApiValueError ,
2525 ForbiddenException ,
2626 NotFoundException ,
27+ RateLimitExceededError ,
2728 ServiceException ,
2829 UnauthorizedException ,
2930 ValidationException ,
@@ -252,6 +253,9 @@ def request(
252253 if r .status == 404 :
253254 raise NotFoundException (http_resp = r )
254255
256+ if r .status == 429 :
257+ raise RateLimitExceededError (http_resp = r )
258+
255259 if 500 <= r .status <= 599 :
256260 raise ServiceException (http_resp = r )
257261
You can’t perform that action at this time.
0 commit comments