@@ -405,6 +405,20 @@ def __init__(self, message, cause=None, http_response=None):
405
405
exceptions .InvalidArgumentError .__init__ (self , message , cause , http_response )
406
406
407
407
408
+ class TooManyAttemptsTryLaterError (exceptions .ResourceExhaustedError ):
409
+ """Rate limited because of too many attempts."""
410
+
411
+ def __init__ (self , message , cause = None , http_response = None ):
412
+ exceptions .ResourceExhaustedError .__init__ (self , message , cause , http_response )
413
+
414
+
415
+ class ResetPasswordExceedLimitError (exceptions .ResourceExhaustedError ):
416
+ """Reset password emails exceeded their limits."""
417
+
418
+ def __init__ (self , message , cause = None , http_response = None ):
419
+ exceptions .ResourceExhaustedError .__init__ (self , message , cause , http_response )
420
+
421
+
408
422
_CODE_TO_EXC_TYPE = {
409
423
'CONFIGURATION_NOT_FOUND' : ConfigurationNotFoundError ,
410
424
'DUPLICATE_EMAIL' : EmailAlreadyExistsError ,
@@ -417,6 +431,8 @@ def __init__(self, message, cause=None, http_response=None):
417
431
'PHONE_NUMBER_EXISTS' : PhoneNumberAlreadyExistsError ,
418
432
'TENANT_NOT_FOUND' : TenantNotFoundError ,
419
433
'USER_NOT_FOUND' : UserNotFoundError ,
434
+ 'TOO_MANY_ATTEMPTS_TRY_LATER' : TooManyAttemptsTryLaterError ,
435
+ 'RESET_PASSWORD_EXCEED_LIMIT' : ResetPasswordExceedLimitError ,
420
436
}
421
437
422
438
0 commit comments