CognitoIdentityProvider / Client / exceptions / ForbiddenException
ForbiddenException¶
- class CognitoIdentityProvider.Client.exceptions.ForbiddenException¶
- This exception is thrown when WAF doesn’t allow your request based on a web ACL that’s associated with your user pool. - Example- try: ... except client.exceptions.ForbiddenException as e: print(e.response) - response¶
- The parsed error response. All exceptions have a top level - Errorkey that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.- Syntax- { 'message': 'string', 'Error': { 'Code': 'string', 'Message': 'string' } } - Structure- (dict) – - This exception is thrown when WAF doesn’t allow your request based on a web ACL that’s associated with your user pool. - message (string) – - The message returned when WAF doesn’t allow your request based on a web ACL that’s associated with your user pool. 
- Error (dict) – Normalized access to common exception attributes. - Code (string) – An identifier specifying the exception type. 
- Message (string) – A descriptive message explaining why the exception occured.