How to catch `botocore.errorfactory.UserNotFoundException`?
When an exception is created by botocore.error_factory then it is not possible to directly import it. Instead of direct import, you should use generated classes for exceptions. A list of possible exceptions is provided for each operation in the documentation. For example, for CognitoIdentityProvider.Client.admin_get_user, possible exceptions are: CognitoIdentityProvider.Client.exceptions.ResourceNotFoundException CognitoIdentityProvider.Client.exceptions.InvalidParameterException CognitoIdentityProvider.Client.exceptions.TooManyRequestsException CognitoIdentityProvider.Client.exceptions.NotAuthorizedException CognitoIdentityProvider.Client.exceptions.UserNotFoundException CognitoIdentityProvider.Client.exceptions.InternalErrorException There is … Read more