#[non_exhaustive]pub enum RevokeTokenError {
ForbiddenException(ForbiddenException),
InternalErrorException(InternalErrorException),
InvalidParameterException(InvalidParameterException),
TooManyRequestsException(TooManyRequestsException),
UnauthorizedException(UnauthorizedException),
UnsupportedOperationException(UnsupportedOperationException),
UnsupportedTokenTypeException(UnsupportedTokenTypeException),
Unhandled(Unhandled),
}Expand description
Error type for the RevokeTokenError operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
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.
InvalidParameterException(InvalidParameterException)
This exception is thrown when the Amazon Cognito service encounters an invalid parameter.
TooManyRequestsException(TooManyRequestsException)
This exception is thrown when the user has made too many requests for a given operation.
Exception that is thrown when the request isn't authorized. This can happen due to an invalid access token in the request.
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.
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 RevokeTokenError
impl RevokeTokenError
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 RevokeTokenError::Unhandled variant from any error type.
sourcepub fn generic(err: ErrorMetadata) -> Self
pub fn generic(err: ErrorMetadata) -> Self
Creates the RevokeTokenError::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_forbidden_exception(&self) -> bool
pub fn is_forbidden_exception(&self) -> bool
Returns true if the error kind is RevokeTokenError::ForbiddenException.
sourcepub fn is_internal_error_exception(&self) -> bool
pub fn is_internal_error_exception(&self) -> bool
Returns true if the error kind is RevokeTokenError::InternalErrorException.
sourcepub fn is_invalid_parameter_exception(&self) -> bool
pub fn is_invalid_parameter_exception(&self) -> bool
Returns true if the error kind is RevokeTokenError::InvalidParameterException.
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 RevokeTokenError::TooManyRequestsException.
Returns true if the error kind is RevokeTokenError::UnauthorizedException.
sourcepub fn is_unsupported_operation_exception(&self) -> bool
pub fn is_unsupported_operation_exception(&self) -> bool
Returns true if the error kind is RevokeTokenError::UnsupportedOperationException.
sourcepub fn is_unsupported_token_type_exception(&self) -> bool
pub fn is_unsupported_token_type_exception(&self) -> bool
Returns true if the error kind is RevokeTokenError::UnsupportedTokenTypeException.
Trait Implementations§
source§impl CreateUnhandledError for RevokeTokenError
impl CreateUnhandledError for RevokeTokenError
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 RevokeTokenError
impl Debug for RevokeTokenError
source§impl Display for RevokeTokenError
impl Display for RevokeTokenError
source§impl Error for RevokeTokenError
impl Error for RevokeTokenError
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<RevokeTokenError> for Error
impl From<RevokeTokenError> for Error
source§fn from(err: RevokeTokenError) -> Self
fn from(err: RevokeTokenError) -> Self
source§impl ProvideErrorKind for RevokeTokenError
impl ProvideErrorKind for RevokeTokenError
source§impl ProvideErrorMetadata for RevokeTokenError
impl ProvideErrorMetadata for RevokeTokenError
source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
source§impl RequestId for RevokeTokenError
impl RequestId for RevokeTokenError
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None if the service could not be reached.