#[non_exhaustive]pub enum CreateTemplateError {
AlreadyExistsException(AlreadyExistsException),
InvalidTemplateException(InvalidTemplateException),
LimitExceededException(LimitExceededException),
Unhandled(Unhandled),
}
Expand description
Error type for the CreateTemplateError
operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AlreadyExistsException(AlreadyExistsException)
Indicates that a resource could not be created because of a naming conflict.
InvalidTemplateException(InvalidTemplateException)
Indicates that the template that you specified could not be rendered. This issue may occur when a template refers to a partial that does not exist.
LimitExceededException(LimitExceededException)
Indicates that a resource could not be created because of service limits. For a list of Amazon SES limits, see the Amazon SES Developer Guide.
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 CreateTemplateError
impl CreateTemplateError
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 CreateTemplateError::Unhandled
variant from any error type.
sourcepub fn generic(err: ErrorMetadata) -> Self
pub fn generic(err: ErrorMetadata) -> Self
Creates the CreateTemplateError::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_already_exists_exception(&self) -> bool
pub fn is_already_exists_exception(&self) -> bool
Returns true
if the error kind is CreateTemplateError::AlreadyExistsException
.
sourcepub fn is_invalid_template_exception(&self) -> bool
pub fn is_invalid_template_exception(&self) -> bool
Returns true
if the error kind is CreateTemplateError::InvalidTemplateException
.
sourcepub fn is_limit_exceeded_exception(&self) -> bool
pub fn is_limit_exceeded_exception(&self) -> bool
Returns true
if the error kind is CreateTemplateError::LimitExceededException
.
Trait Implementations§
source§impl CreateUnhandledError for CreateTemplateError
impl CreateUnhandledError for CreateTemplateError
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 CreateTemplateError
impl Debug for CreateTemplateError
source§impl Display for CreateTemplateError
impl Display for CreateTemplateError
source§impl Error for CreateTemplateError
impl Error for CreateTemplateError
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<CreateTemplateError> for Error
impl From<CreateTemplateError> for Error
source§fn from(err: CreateTemplateError) -> Self
fn from(err: CreateTemplateError) -> Self
source§impl ProvideErrorMetadata for CreateTemplateError
impl ProvideErrorMetadata for CreateTemplateError
source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
source§impl RequestId for CreateTemplateError
impl RequestId for CreateTemplateError
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None
if the service could not be reached.