#[non_exhaustive]pub enum ConfirmSignUpError {
Show 16 variants
AliasExistsException(AliasExistsException),
CodeMismatchException(CodeMismatchException),
ExpiredCodeException(ExpiredCodeException),
ForbiddenException(ForbiddenException),
InternalErrorException(InternalErrorException),
InvalidLambdaResponseException(InvalidLambdaResponseException),
InvalidParameterException(InvalidParameterException),
LimitExceededException(LimitExceededException),
NotAuthorizedException(NotAuthorizedException),
ResourceNotFoundException(ResourceNotFoundException),
TooManyFailedAttemptsException(TooManyFailedAttemptsException),
TooManyRequestsException(TooManyRequestsException),
UnexpectedLambdaException(UnexpectedLambdaException),
UserLambdaValidationException(UserLambdaValidationException),
UserNotFoundException(UserNotFoundException),
Unhandled(Unhandled),
}
Expand description
Error type for the ConfirmSignUpError
operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AliasExistsException(AliasExistsException)
This exception is thrown when a user tries to confirm the account with an email address or phone number that has already been supplied as an alias for a different user profile. This exception indicates that an account with this email address or phone already exists in a user pool that you've configured to use email address or phone number as a sign-in alias.
CodeMismatchException(CodeMismatchException)
This exception is thrown if the provided code doesn't match what the server was expecting.
ExpiredCodeException(ExpiredCodeException)
This exception is thrown if a code has expired.
ForbiddenException(ForbiddenException)
This exception is thrown when WAF doesn't allow your request based on a web ACL that's associated with your user pool.
InternalErrorException(InternalErrorException)
This exception is thrown when Amazon Cognito encounters an internal error.
InvalidLambdaResponseException(InvalidLambdaResponseException)
This exception is thrown when Amazon Cognito encounters an invalid Lambda response.
InvalidParameterException(InvalidParameterException)
This exception is thrown when the Amazon Cognito service encounters an invalid parameter.
LimitExceededException(LimitExceededException)
This exception is thrown when a user exceeds the limit for a requested Amazon Web Services resource.
NotAuthorizedException(NotAuthorizedException)
This exception is thrown when a user isn't authorized.
ResourceNotFoundException(ResourceNotFoundException)
This exception is thrown when the Amazon Cognito service can't find the requested resource.
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.
UnexpectedLambdaException(UnexpectedLambdaException)
This exception is thrown when Amazon Cognito encounters an unexpected exception with Lambda.
UserLambdaValidationException(UserLambdaValidationException)
This exception is thrown when the Amazon Cognito service encounters a user validation exception with the Lambda service.
UserNotFoundException(UserNotFoundException)
This exception is thrown when a user isn't found.
Unhandled(Unhandled)
Unhandled
directly is not forwards compatible. Instead, match using a variable wildcard pattern and check .code()
:
err if err.code() == Some("SpecificExceptionCode") => { /* handle the error */ }
See ProvideErrorMetadata
for what information is available for the error.An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
Implementations§
source§impl ConfirmSignUpError
impl ConfirmSignUpError
sourcepub fn unhandled(err: impl Into<Box<dyn Error + Send + Sync + 'static>>) -> Self
pub fn unhandled(err: impl Into<Box<dyn Error + Send + Sync + 'static>>) -> Self
Creates the ConfirmSignUpError::Unhandled
variant from any error type.
sourcepub fn generic(err: ErrorMetadata) -> Self
pub fn generic(err: ErrorMetadata) -> Self
Creates the ConfirmSignUpError::Unhandled
variant from an ErrorMetadata
.
sourcepub fn meta(&self) -> &ErrorMetadata
pub fn meta(&self) -> &ErrorMetadata
Returns error metadata, which includes the error code, message, request ID, and potentially additional information.
sourcepub fn is_alias_exists_exception(&self) -> bool
pub fn is_alias_exists_exception(&self) -> bool
Returns true
if the error kind is ConfirmSignUpError::AliasExistsException
.
sourcepub fn is_code_mismatch_exception(&self) -> bool
pub fn is_code_mismatch_exception(&self) -> bool
Returns true
if the error kind is ConfirmSignUpError::CodeMismatchException
.
sourcepub fn is_expired_code_exception(&self) -> bool
pub fn is_expired_code_exception(&self) -> bool
Returns true
if the error kind is ConfirmSignUpError::ExpiredCodeException
.
sourcepub fn is_forbidden_exception(&self) -> bool
pub fn is_forbidden_exception(&self) -> bool
Returns true
if the error kind is ConfirmSignUpError::ForbiddenException
.
sourcepub fn is_internal_error_exception(&self) -> bool
pub fn is_internal_error_exception(&self) -> bool
Returns true
if the error kind is ConfirmSignUpError::InternalErrorException
.
sourcepub fn is_invalid_lambda_response_exception(&self) -> bool
pub fn is_invalid_lambda_response_exception(&self) -> bool
Returns true
if the error kind is ConfirmSignUpError::InvalidLambdaResponseException
.
sourcepub fn is_invalid_parameter_exception(&self) -> bool
pub fn is_invalid_parameter_exception(&self) -> bool
Returns true
if the error kind is ConfirmSignUpError::InvalidParameterException
.
sourcepub fn is_limit_exceeded_exception(&self) -> bool
pub fn is_limit_exceeded_exception(&self) -> bool
Returns true
if the error kind is ConfirmSignUpError::LimitExceededException
.
Returns true
if the error kind is ConfirmSignUpError::NotAuthorizedException
.
sourcepub fn is_resource_not_found_exception(&self) -> bool
pub fn is_resource_not_found_exception(&self) -> bool
Returns true
if the error kind is ConfirmSignUpError::ResourceNotFoundException
.
sourcepub fn is_too_many_failed_attempts_exception(&self) -> bool
pub fn is_too_many_failed_attempts_exception(&self) -> bool
Returns true
if the error kind is ConfirmSignUpError::TooManyFailedAttemptsException
.
sourcepub fn is_too_many_requests_exception(&self) -> bool
pub fn is_too_many_requests_exception(&self) -> bool
Returns true
if the error kind is ConfirmSignUpError::TooManyRequestsException
.
sourcepub fn is_unexpected_lambda_exception(&self) -> bool
pub fn is_unexpected_lambda_exception(&self) -> bool
Returns true
if the error kind is ConfirmSignUpError::UnexpectedLambdaException
.
sourcepub fn is_user_lambda_validation_exception(&self) -> bool
pub fn is_user_lambda_validation_exception(&self) -> bool
Returns true
if the error kind is ConfirmSignUpError::UserLambdaValidationException
.
sourcepub fn is_user_not_found_exception(&self) -> bool
pub fn is_user_not_found_exception(&self) -> bool
Returns true
if the error kind is ConfirmSignUpError::UserNotFoundException
.
Trait Implementations§
source§impl CreateUnhandledError for ConfirmSignUpError
impl CreateUnhandledError for ConfirmSignUpError
source§fn create_unhandled_error(
source: Box<dyn Error + Send + Sync + 'static>,
meta: Option<ErrorMetadata>,
) -> Self
fn create_unhandled_error( source: Box<dyn Error + Send + Sync + 'static>, meta: Option<ErrorMetadata>, ) -> Self
source
and error metadata.source§impl Debug for ConfirmSignUpError
impl Debug for ConfirmSignUpError
source§impl Display for ConfirmSignUpError
impl Display for ConfirmSignUpError
source§impl Error for ConfirmSignUpError
impl Error for ConfirmSignUpError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<ConfirmSignUpError> for Error
impl From<ConfirmSignUpError> for Error
source§fn from(err: ConfirmSignUpError) -> Self
fn from(err: ConfirmSignUpError) -> Self
source§impl ProvideErrorMetadata for ConfirmSignUpError
impl ProvideErrorMetadata for ConfirmSignUpError
source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
source§impl RequestId for ConfirmSignUpError
impl RequestId for ConfirmSignUpError
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None
if the service could not be reached.Auto Trait Implementations§
impl Freeze for ConfirmSignUpError
impl !RefUnwindSafe for ConfirmSignUpError
impl Send for ConfirmSignUpError
impl Sync for ConfirmSignUpError
impl Unpin for ConfirmSignUpError
impl !UnwindSafe for ConfirmSignUpError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more