#[non_exhaustive]pub enum DescribeJobExecutionError {
CertificateValidationException(CertificateValidationException),
InvalidRequestException(InvalidRequestException),
ResourceNotFoundException(ResourceNotFoundException),
ServiceUnavailableException(ServiceUnavailableException),
TerminalStateException(TerminalStateException),
ThrottlingException(ThrottlingException),
Unhandled(Unhandled),
}
Expand description
Error type for the DescribeJobExecutionError
operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CertificateValidationException(CertificateValidationException)
The certificate is invalid.
InvalidRequestException(InvalidRequestException)
The contents of the request were invalid. For example, this code is returned when an UpdateJobExecution request contains invalid status details. The message contains details about the error.
ResourceNotFoundException(ResourceNotFoundException)
The specified resource does not exist.
The service is temporarily unavailable.
TerminalStateException(TerminalStateException)
The job is in a terminal state.
ThrottlingException(ThrottlingException)
The rate exceeds the limit.
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 DescribeJobExecutionError
impl DescribeJobExecutionError
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 DescribeJobExecutionError::Unhandled
variant from any error type.
sourcepub fn generic(err: ErrorMetadata) -> Self
pub fn generic(err: ErrorMetadata) -> Self
Creates the DescribeJobExecutionError::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_validation_exception(&self) -> bool
pub fn is_certificate_validation_exception(&self) -> bool
Returns true
if the error kind is DescribeJobExecutionError::CertificateValidationException
.
sourcepub fn is_invalid_request_exception(&self) -> bool
pub fn is_invalid_request_exception(&self) -> bool
Returns true
if the error kind is DescribeJobExecutionError::InvalidRequestException
.
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 DescribeJobExecutionError::ResourceNotFoundException
.
Returns true
if the error kind is DescribeJobExecutionError::ServiceUnavailableException
.
sourcepub fn is_terminal_state_exception(&self) -> bool
pub fn is_terminal_state_exception(&self) -> bool
Returns true
if the error kind is DescribeJobExecutionError::TerminalStateException
.
sourcepub fn is_throttling_exception(&self) -> bool
pub fn is_throttling_exception(&self) -> bool
Returns true
if the error kind is DescribeJobExecutionError::ThrottlingException
.
Trait Implementations§
source§impl CreateUnhandledError for DescribeJobExecutionError
impl CreateUnhandledError for DescribeJobExecutionError
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 DescribeJobExecutionError
impl Debug for DescribeJobExecutionError
source§impl Display for DescribeJobExecutionError
impl Display for DescribeJobExecutionError
source§impl Error for DescribeJobExecutionError
impl Error for DescribeJobExecutionError
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<DescribeJobExecutionError> for Error
impl From<DescribeJobExecutionError> for Error
source§fn from(err: DescribeJobExecutionError) -> Self
fn from(err: DescribeJobExecutionError) -> Self
source§impl ProvideErrorMetadata for DescribeJobExecutionError
impl ProvideErrorMetadata for DescribeJobExecutionError
source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
source§impl RequestId for DescribeJobExecutionError
impl RequestId for DescribeJobExecutionError
source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None
if the service could not be reached.