#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
ClientException(crate::types::error::ClientException),
ServerException(crate::types::error::ServerException),
#[deprecated(note = "Matching `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`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
Unhandled(crate::error::sealed_unhandled::Unhandled),
}
impl ::std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::ClientException(inner) => inner.fmt(f),
Error::ServerException(inner) => inner.fmt(f),
Error::Unhandled(_) => {
if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
write!(f, "unhandled error ({code})")
} else {
f.write_str("unhandled error")
}
}
}
}
}
impl From<::aws_smithy_types::error::operation::BuildError> for Error {
fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
source: value.into(),
meta: ::std::default::Default::default(),
})
}
}
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
match self {
Self::ClientException(inner) => inner.meta(),
Self::ServerException(inner) => inner.meta(),
Self::Unhandled(inner) => &inner.meta,
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_job::CancelJobError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_job::CancelJobError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::cancel_job::CancelJobError> for Error {
fn from(err: crate::operation::cancel_job::CancelJobError) -> Self {
match err {
crate::operation::cancel_job::CancelJobError::ClientException(inner) => Error::ClientException(inner),
crate::operation::cancel_job::CancelJobError::ServerException(inner) => Error::ServerException(inner),
crate::operation::cancel_job::CancelJobError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_compute_environment::CreateComputeEnvironmentError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_compute_environment::CreateComputeEnvironmentError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::create_compute_environment::CreateComputeEnvironmentError> for Error {
fn from(err: crate::operation::create_compute_environment::CreateComputeEnvironmentError) -> Self {
match err {
crate::operation::create_compute_environment::CreateComputeEnvironmentError::ClientException(inner) => Error::ClientException(inner),
crate::operation::create_compute_environment::CreateComputeEnvironmentError::ServerException(inner) => Error::ServerException(inner),
crate::operation::create_compute_environment::CreateComputeEnvironmentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_job_queue::CreateJobQueueError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_job_queue::CreateJobQueueError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::create_job_queue::CreateJobQueueError> for Error {
fn from(err: crate::operation::create_job_queue::CreateJobQueueError) -> Self {
match err {
crate::operation::create_job_queue::CreateJobQueueError::ClientException(inner) => Error::ClientException(inner),
crate::operation::create_job_queue::CreateJobQueueError::ServerException(inner) => Error::ServerException(inner),
crate::operation::create_job_queue::CreateJobQueueError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_scheduling_policy::CreateSchedulingPolicyError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_scheduling_policy::CreateSchedulingPolicyError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::create_scheduling_policy::CreateSchedulingPolicyError> for Error {
fn from(err: crate::operation::create_scheduling_policy::CreateSchedulingPolicyError) -> Self {
match err {
crate::operation::create_scheduling_policy::CreateSchedulingPolicyError::ClientException(inner) => Error::ClientException(inner),
crate::operation::create_scheduling_policy::CreateSchedulingPolicyError::ServerException(inner) => Error::ServerException(inner),
crate::operation::create_scheduling_policy::CreateSchedulingPolicyError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_compute_environment::DeleteComputeEnvironmentError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_compute_environment::DeleteComputeEnvironmentError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::delete_compute_environment::DeleteComputeEnvironmentError> for Error {
fn from(err: crate::operation::delete_compute_environment::DeleteComputeEnvironmentError) -> Self {
match err {
crate::operation::delete_compute_environment::DeleteComputeEnvironmentError::ClientException(inner) => Error::ClientException(inner),
crate::operation::delete_compute_environment::DeleteComputeEnvironmentError::ServerException(inner) => Error::ServerException(inner),
crate::operation::delete_compute_environment::DeleteComputeEnvironmentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_job_queue::DeleteJobQueueError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_job_queue::DeleteJobQueueError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::delete_job_queue::DeleteJobQueueError> for Error {
fn from(err: crate::operation::delete_job_queue::DeleteJobQueueError) -> Self {
match err {
crate::operation::delete_job_queue::DeleteJobQueueError::ClientException(inner) => Error::ClientException(inner),
crate::operation::delete_job_queue::DeleteJobQueueError::ServerException(inner) => Error::ServerException(inner),
crate::operation::delete_job_queue::DeleteJobQueueError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_scheduling_policy::DeleteSchedulingPolicyError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_scheduling_policy::DeleteSchedulingPolicyError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::delete_scheduling_policy::DeleteSchedulingPolicyError> for Error {
fn from(err: crate::operation::delete_scheduling_policy::DeleteSchedulingPolicyError) -> Self {
match err {
crate::operation::delete_scheduling_policy::DeleteSchedulingPolicyError::ClientException(inner) => Error::ClientException(inner),
crate::operation::delete_scheduling_policy::DeleteSchedulingPolicyError::ServerException(inner) => Error::ServerException(inner),
crate::operation::delete_scheduling_policy::DeleteSchedulingPolicyError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::deregister_job_definition::DeregisterJobDefinitionError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::deregister_job_definition::DeregisterJobDefinitionError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::deregister_job_definition::DeregisterJobDefinitionError> for Error {
fn from(err: crate::operation::deregister_job_definition::DeregisterJobDefinitionError) -> Self {
match err {
crate::operation::deregister_job_definition::DeregisterJobDefinitionError::ClientException(inner) => Error::ClientException(inner),
crate::operation::deregister_job_definition::DeregisterJobDefinitionError::ServerException(inner) => Error::ServerException(inner),
crate::operation::deregister_job_definition::DeregisterJobDefinitionError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_compute_environments::DescribeComputeEnvironmentsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_compute_environments::DescribeComputeEnvironmentsError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_compute_environments::DescribeComputeEnvironmentsError> for Error {
fn from(err: crate::operation::describe_compute_environments::DescribeComputeEnvironmentsError) -> Self {
match err {
crate::operation::describe_compute_environments::DescribeComputeEnvironmentsError::ClientException(inner) => {
Error::ClientException(inner)
}
crate::operation::describe_compute_environments::DescribeComputeEnvironmentsError::ServerException(inner) => {
Error::ServerException(inner)
}
crate::operation::describe_compute_environments::DescribeComputeEnvironmentsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_job_definitions::DescribeJobDefinitionsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_job_definitions::DescribeJobDefinitionsError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_job_definitions::DescribeJobDefinitionsError> for Error {
fn from(err: crate::operation::describe_job_definitions::DescribeJobDefinitionsError) -> Self {
match err {
crate::operation::describe_job_definitions::DescribeJobDefinitionsError::ClientException(inner) => Error::ClientException(inner),
crate::operation::describe_job_definitions::DescribeJobDefinitionsError::ServerException(inner) => Error::ServerException(inner),
crate::operation::describe_job_definitions::DescribeJobDefinitionsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_job_queues::DescribeJobQueuesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_job_queues::DescribeJobQueuesError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_job_queues::DescribeJobQueuesError> for Error {
fn from(err: crate::operation::describe_job_queues::DescribeJobQueuesError) -> Self {
match err {
crate::operation::describe_job_queues::DescribeJobQueuesError::ClientException(inner) => Error::ClientException(inner),
crate::operation::describe_job_queues::DescribeJobQueuesError::ServerException(inner) => Error::ServerException(inner),
crate::operation::describe_job_queues::DescribeJobQueuesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_jobs::DescribeJobsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_jobs::DescribeJobsError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_jobs::DescribeJobsError> for Error {
fn from(err: crate::operation::describe_jobs::DescribeJobsError) -> Self {
match err {
crate::operation::describe_jobs::DescribeJobsError::ClientException(inner) => Error::ClientException(inner),
crate::operation::describe_jobs::DescribeJobsError::ServerException(inner) => Error::ServerException(inner),
crate::operation::describe_jobs::DescribeJobsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_scheduling_policies::DescribeSchedulingPoliciesError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_scheduling_policies::DescribeSchedulingPoliciesError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_scheduling_policies::DescribeSchedulingPoliciesError> for Error {
fn from(err: crate::operation::describe_scheduling_policies::DescribeSchedulingPoliciesError) -> Self {
match err {
crate::operation::describe_scheduling_policies::DescribeSchedulingPoliciesError::ClientException(inner) => Error::ClientException(inner),
crate::operation::describe_scheduling_policies::DescribeSchedulingPoliciesError::ServerException(inner) => Error::ServerException(inner),
crate::operation::describe_scheduling_policies::DescribeSchedulingPoliciesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_jobs::ListJobsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_jobs::ListJobsError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_jobs::ListJobsError> for Error {
fn from(err: crate::operation::list_jobs::ListJobsError) -> Self {
match err {
crate::operation::list_jobs::ListJobsError::ClientException(inner) => Error::ClientException(inner),
crate::operation::list_jobs::ListJobsError::ServerException(inner) => Error::ServerException(inner),
crate::operation::list_jobs::ListJobsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_scheduling_policies::ListSchedulingPoliciesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_scheduling_policies::ListSchedulingPoliciesError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_scheduling_policies::ListSchedulingPoliciesError> for Error {
fn from(err: crate::operation::list_scheduling_policies::ListSchedulingPoliciesError) -> Self {
match err {
crate::operation::list_scheduling_policies::ListSchedulingPoliciesError::ClientException(inner) => Error::ClientException(inner),
crate::operation::list_scheduling_policies::ListSchedulingPoliciesError::ServerException(inner) => Error::ServerException(inner),
crate::operation::list_scheduling_policies::ListSchedulingPoliciesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
match err {
crate::operation::list_tags_for_resource::ListTagsForResourceError::ClientException(inner) => Error::ClientException(inner),
crate::operation::list_tags_for_resource::ListTagsForResourceError::ServerException(inner) => Error::ServerException(inner),
crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::register_job_definition::RegisterJobDefinitionError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::register_job_definition::RegisterJobDefinitionError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::register_job_definition::RegisterJobDefinitionError> for Error {
fn from(err: crate::operation::register_job_definition::RegisterJobDefinitionError) -> Self {
match err {
crate::operation::register_job_definition::RegisterJobDefinitionError::ClientException(inner) => Error::ClientException(inner),
crate::operation::register_job_definition::RegisterJobDefinitionError::ServerException(inner) => Error::ServerException(inner),
crate::operation::register_job_definition::RegisterJobDefinitionError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::submit_job::SubmitJobError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::submit_job::SubmitJobError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::submit_job::SubmitJobError> for Error {
fn from(err: crate::operation::submit_job::SubmitJobError) -> Self {
match err {
crate::operation::submit_job::SubmitJobError::ClientException(inner) => Error::ClientException(inner),
crate::operation::submit_job::SubmitJobError::ServerException(inner) => Error::ServerException(inner),
crate::operation::submit_job::SubmitJobError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::tag_resource::TagResourceError> for Error {
fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
match err {
crate::operation::tag_resource::TagResourceError::ClientException(inner) => Error::ClientException(inner),
crate::operation::tag_resource::TagResourceError::ServerException(inner) => Error::ServerException(inner),
crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::terminate_job::TerminateJobError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::terminate_job::TerminateJobError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::terminate_job::TerminateJobError> for Error {
fn from(err: crate::operation::terminate_job::TerminateJobError) -> Self {
match err {
crate::operation::terminate_job::TerminateJobError::ClientException(inner) => Error::ClientException(inner),
crate::operation::terminate_job::TerminateJobError::ServerException(inner) => Error::ServerException(inner),
crate::operation::terminate_job::TerminateJobError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::untag_resource::UntagResourceError> for Error {
fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
match err {
crate::operation::untag_resource::UntagResourceError::ClientException(inner) => Error::ClientException(inner),
crate::operation::untag_resource::UntagResourceError::ServerException(inner) => Error::ServerException(inner),
crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_compute_environment::UpdateComputeEnvironmentError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_compute_environment::UpdateComputeEnvironmentError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::update_compute_environment::UpdateComputeEnvironmentError> for Error {
fn from(err: crate::operation::update_compute_environment::UpdateComputeEnvironmentError) -> Self {
match err {
crate::operation::update_compute_environment::UpdateComputeEnvironmentError::ClientException(inner) => Error::ClientException(inner),
crate::operation::update_compute_environment::UpdateComputeEnvironmentError::ServerException(inner) => Error::ServerException(inner),
crate::operation::update_compute_environment::UpdateComputeEnvironmentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_job_queue::UpdateJobQueueError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_job_queue::UpdateJobQueueError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::update_job_queue::UpdateJobQueueError> for Error {
fn from(err: crate::operation::update_job_queue::UpdateJobQueueError) -> Self {
match err {
crate::operation::update_job_queue::UpdateJobQueueError::ClientException(inner) => Error::ClientException(inner),
crate::operation::update_job_queue::UpdateJobQueueError::ServerException(inner) => Error::ServerException(inner),
crate::operation::update_job_queue::UpdateJobQueueError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_scheduling_policy::UpdateSchedulingPolicyError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_scheduling_policy::UpdateSchedulingPolicyError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::update_scheduling_policy::UpdateSchedulingPolicyError> for Error {
fn from(err: crate::operation::update_scheduling_policy::UpdateSchedulingPolicyError) -> Self {
match err {
crate::operation::update_scheduling_policy::UpdateSchedulingPolicyError::ClientException(inner) => Error::ClientException(inner),
crate::operation::update_scheduling_policy::UpdateSchedulingPolicyError::ServerException(inner) => Error::ServerException(inner),
crate::operation::update_scheduling_policy::UpdateSchedulingPolicyError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl ::std::error::Error for Error {
fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
match self {
Error::ClientException(inner) => inner.source(),
Error::ServerException(inner) => inner.source(),
Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
}
}
}
impl ::aws_types::request_id::RequestId for Error {
fn request_id(&self) -> Option<&str> {
match self {
Self::ClientException(e) => e.request_id(),
Self::ServerException(e) => e.request_id(),
Self::Unhandled(e) => e.meta.request_id(),
}
}
}