#[non_exhaustive]pub enum RegisterCertificateError {
CertificateConflictException(CertificateConflictException),
CertificateStateException(CertificateStateException),
CertificateValidationException(CertificateValidationException),
InternalFailureException(InternalFailureException),
InvalidRequestException(InvalidRequestException),
ResourceAlreadyExistsException(ResourceAlreadyExistsException),
ServiceUnavailableException(ServiceUnavailableException),
ThrottlingException(ThrottlingException),
UnauthorizedException(UnauthorizedException),
Unhandled(Unhandled),
}
Expand description
Error type for the RegisterCertificateError
operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CertificateConflictException(CertificateConflictException)
Unable to verify the CA certificate used to sign the device certificate you are attempting to register. This is happens when you have registered more than one CA certificate that has the same subject field and public key.
CertificateStateException(CertificateStateException)
The certificate operation is not allowed.
CertificateValidationException(CertificateValidationException)
The certificate is invalid.
InternalFailureException(InternalFailureException)
An unexpected error has occurred.
InvalidRequestException(InvalidRequestException)
The request is not valid.
ResourceAlreadyExistsException(ResourceAlreadyExistsException)
The resource already exists.
The service is temporarily unavailable.
ThrottlingException(ThrottlingException)
The rate exceeds the limit.
You are not authorized to perform this 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 RegisterCertificateError
impl RegisterCertificateError
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 RegisterCertificateError::Unhandled
variant from any error type.
sourcepub fn generic(err: ErrorMetadata) -> Self
pub fn generic(err: ErrorMetadata) -> Self
Creates the RegisterCertificateError::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_certificate_conflict_exception(&self) -> bool
pub fn is_certificate_conflict_exception(&self) -> bool
Returns true
if the error kind is RegisterCertificateError::CertificateConflictException
.
sourcepub fn is_certificate_state_exception(&self) -> bool
pub fn is_certificate_state_exception(&self) -> bool
Returns true
if the error kind is RegisterCertificateError::CertificateStateException
.
sourcepub fn is_certificate_validation_exception(&self) -> bool
pub fn is_certificate_validation_exception(&self) -> bool
Returns true
if the error kind is RegisterCertificateError::CertificateValidationException
.
sourcepub fn is_internal_failure_exception(&self) -> bool
pub fn is_internal_failure_exception(&self) -> bool
Returns true
if the error kind is RegisterCertificateError::InternalFailureException
.
sourcepub fn is_invalid_request_exception(&self) -> bool
pub fn is_invalid_request_exception(&self) -> bool
Returns true
if the error kind is RegisterCertificateError::InvalidRequestException
.
sourcepub fn is_resource_already_exists_exception(&self) -> bool
pub fn is_resource_already_exists_exception(&self) -> bool
Returns true
if the error kind is RegisterCertificateError::ResourceAlreadyExistsException
.
Returns true
if the error kind is RegisterCertificateError::ServiceUnavailableException
.
sourcepub fn is_throttling_exception(&self) -> bool
pub fn is_throttling_exception(&self) -> bool
Returns true
if the error kind is RegisterCertificateError::ThrottlingException
.
Returns true
if the error kind is RegisterCertificateError::UnauthorizedException
.
Trait Implementations§
source§impl CreateUnhandledError for RegisterCertificateError
impl CreateUnhandledError for RegisterCertificateError
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 RegisterCertificateError
impl Debug for RegisterCertificateError
source§impl Display for RegisterCertificateError
impl Display for RegisterCertificateError
source§impl Error for RegisterCertificateError
impl Error for RegisterCertificateError
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<RegisterCertificateError> for Error
impl From<RegisterCertificateError> for Error
source§fn from(err: RegisterCertificateError) -> Self
fn from(err: RegisterCertificateError) -> Self
source§impl ProvideErrorMetadata for RegisterCertificateError
impl ProvideErrorMetadata for RegisterCertificateError
source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
source§impl RequestId for RegisterCertificateError
impl RequestId for RegisterCertificateError
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None
if the service could not be reached.