#[non_exhaustive]
pub enum Error {
Show 41 variants AliasExistsException(AliasExistsException), CodeDeliveryFailureException(CodeDeliveryFailureException), CodeMismatchException(CodeMismatchException), ConcurrentModificationException(ConcurrentModificationException), DuplicateProviderException(DuplicateProviderException), EnableSoftwareTokenMfaException(EnableSoftwareTokenMfaException), ExpiredCodeException(ExpiredCodeException), GroupExistsException(GroupExistsException), InternalErrorException(InternalErrorException), InvalidEmailRoleAccessPolicyException(InvalidEmailRoleAccessPolicyException), InvalidLambdaResponseException(InvalidLambdaResponseException), InvalidOAuthFlowException(InvalidOAuthFlowException), InvalidParameterException(InvalidParameterException), InvalidPasswordException(InvalidPasswordException), InvalidSmsRoleAccessPolicyException(InvalidSmsRoleAccessPolicyException), InvalidSmsRoleTrustRelationshipException(InvalidSmsRoleTrustRelationshipException), InvalidUserPoolConfigurationException(InvalidUserPoolConfigurationException), LimitExceededException(LimitExceededException), MfaMethodNotFoundException(MfaMethodNotFoundException), NotAuthorizedException(NotAuthorizedException), PasswordResetRequiredException(PasswordResetRequiredException), PreconditionNotMetException(PreconditionNotMetException), ResourceNotFoundException(ResourceNotFoundException), ScopeDoesNotExistException(ScopeDoesNotExistException), SoftwareTokenMfaNotFoundException(SoftwareTokenMfaNotFoundException), TooManyFailedAttemptsException(TooManyFailedAttemptsException), TooManyRequestsException(TooManyRequestsException), UnauthorizedException(UnauthorizedException), UnexpectedLambdaException(UnexpectedLambdaException), UnsupportedIdentityProviderException(UnsupportedIdentityProviderException), UnsupportedOperationException(UnsupportedOperationException), UnsupportedTokenTypeException(UnsupportedTokenTypeException), UnsupportedUserStateException(UnsupportedUserStateException), UserImportInProgressException(UserImportInProgressException), UserLambdaValidationException(UserLambdaValidationException), UserNotConfirmedException(UserNotConfirmedException), UserNotFoundException(UserNotFoundException), UserPoolAddOnNotEnabledException(UserPoolAddOnNotEnabledException), UserPoolTaggingException(UserPoolTaggingException), UsernameExistsException(UsernameExistsException), Unhandled(Box<dyn Error + Send + Sync + 'static>),
}
Expand description

All possible error types for this service.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

AliasExistsException(AliasExistsException)

This exception is thrown when a user tries to confirm the account with an email or phone number that has already been supplied as an alias from a different account. This exception tells user that an account with this email or phone already exists.

CodeDeliveryFailureException(CodeDeliveryFailureException)

This exception is thrown when a verification code fails to deliver successfully.

CodeMismatchException(CodeMismatchException)

This exception is thrown if the provided code doesn't match what the server was expecting.

ConcurrentModificationException(ConcurrentModificationException)

This exception is thrown if two or more modifications are happening concurrently.

DuplicateProviderException(DuplicateProviderException)

This exception is thrown when the provider is already supported by the user pool.

EnableSoftwareTokenMfaException(EnableSoftwareTokenMfaException)

This exception is thrown when there is a code mismatch and the service fails to configure the software token TOTP multi-factor authentication (MFA).

ExpiredCodeException(ExpiredCodeException)

This exception is thrown if a code has expired.

GroupExistsException(GroupExistsException)

This exception is thrown when Amazon Cognito encounters a group that already exists in the user pool.

InternalErrorException(InternalErrorException)

This exception is thrown when Amazon Cognito encounters an internal error.

InvalidEmailRoleAccessPolicyException(InvalidEmailRoleAccessPolicyException)

This exception is thrown when Amazon Cognito isn't allowed to use your email identity. HTTP status code: 400.

InvalidLambdaResponseException(InvalidLambdaResponseException)

This exception is thrown when Amazon Cognito encounters an invalid Lambda response.

InvalidOAuthFlowException(InvalidOAuthFlowException)

This exception is thrown when the specified OAuth flow is not valid.

InvalidParameterException(InvalidParameterException)

This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

InvalidPasswordException(InvalidPasswordException)

This exception is thrown when Amazon Cognito encounters an invalid password.

InvalidSmsRoleAccessPolicyException(InvalidSmsRoleAccessPolicyException)

This exception is returned when the role provided for SMS configuration doesn't have permission to publish using Amazon SNS.

InvalidSmsRoleTrustRelationshipException(InvalidSmsRoleTrustRelationshipException)

This exception is thrown when the trust relationship is not valid for the role provided for SMS configuration. This can happen if you don't trust cognito-idp.amazonaws.com or the external ID provided in the role does not match what is provided in the SMS configuration for the user pool.

InvalidUserPoolConfigurationException(InvalidUserPoolConfigurationException)

This exception is thrown when the user pool configuration is not valid.

LimitExceededException(LimitExceededException)

This exception is thrown when a user exceeds the limit for a requested Amazon Web Services resource.

MfaMethodNotFoundException(MfaMethodNotFoundException)

This exception is thrown when Amazon Cognito can't find a multi-factor authentication (MFA) method.

NotAuthorizedException(NotAuthorizedException)

This exception is thrown when a user isn't authorized.

PasswordResetRequiredException(PasswordResetRequiredException)

This exception is thrown when a password reset is required.

PreconditionNotMetException(PreconditionNotMetException)

This exception is thrown when a precondition is not met.

ResourceNotFoundException(ResourceNotFoundException)

This exception is thrown when the Amazon Cognito service can't find the requested resource.

ScopeDoesNotExistException(ScopeDoesNotExistException)

This exception is thrown when the specified scope doesn't exist.

SoftwareTokenMfaNotFoundException(SoftwareTokenMfaNotFoundException)

This exception is thrown when the software token time-based one-time password (TOTP) multi-factor authentication (MFA) isn't activated for the user pool.

TooManyFailedAttemptsException(TooManyFailedAttemptsException)

This exception is thrown when the user has made too many failed attempts for a given action, such as sign-in.

TooManyRequestsException(TooManyRequestsException)

This exception is thrown when the user has made too many requests for a given operation.

UnauthorizedException(UnauthorizedException)

Exception that is thrown when the request isn't authorized. This can happen due to an invalid access token in the request.

UnexpectedLambdaException(UnexpectedLambdaException)

This exception is thrown when Amazon Cognito encounters an unexpected exception with Lambda.

UnsupportedIdentityProviderException(UnsupportedIdentityProviderException)

This exception is thrown when the specified identifier isn't supported.

UnsupportedOperationException(UnsupportedOperationException)

Exception that is thrown when you attempt to perform an operation that isn't enabled for the user pool client.

UnsupportedTokenTypeException(UnsupportedTokenTypeException)

Exception that is thrown when an unsupported token is passed to an operation.

UnsupportedUserStateException(UnsupportedUserStateException)

The request failed because the user is in an unsupported state.

UserImportInProgressException(UserImportInProgressException)

This exception is thrown when you're trying to modify a user pool while a user import job is in progress for that pool.

UserLambdaValidationException(UserLambdaValidationException)

This exception is thrown when the Amazon Cognito service encounters a user validation exception with the Lambda service.

UserNotConfirmedException(UserNotConfirmedException)

This exception is thrown when a user isn't confirmed successfully.

UserNotFoundException(UserNotFoundException)

This exception is thrown when a user isn't found.

UserPoolAddOnNotEnabledException(UserPoolAddOnNotEnabledException)

This exception is thrown when user pool add-ons aren't enabled.

UserPoolTaggingException(UserPoolTaggingException)

This exception is thrown when a user pool tag can't be set or updated.

UsernameExistsException(UsernameExistsException)

This exception is thrown when Amazon Cognito encounters a user name that already exists in the user pool.

Unhandled(Box<dyn Error + Send + Sync + 'static>)

An unhandled error occurred.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more