// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// All possible error types for this service.
#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
///
These errors are usually caused by a client action. One example cause is using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Another cause is specifying an identifier that's not valid.
ClientException(crate::types::error::ClientException),
/// These errors are usually caused by a server issue.
ServerException(crate::types::error::ServerException),
/// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
#[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 From<::aws_smithy_runtime_api::client::result::SdkError> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError,
) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError,
) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError,
) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError,
) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError,
) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError,
) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError,
) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError,
) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> 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 for Error {
fn from(err: crate::operation::get_job_queue_snapshot::GetJobQueueSnapshotError) -> Self {
match err {
crate::operation::get_job_queue_snapshot::GetJobQueueSnapshotError::ClientException(inner) => Error::ClientException(inner),
crate::operation::get_job_queue_snapshot::GetJobQueueSnapshotError::ServerException(inner) => Error::ServerException(inner),
crate::operation::get_job_queue_snapshot::GetJobQueueSnapshotError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl From<::aws_smithy_runtime_api::client::result::SdkError> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError,
) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError,
) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError,
) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError) -> 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 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 From<::aws_smithy_runtime_api::client::result::SdkError> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError,
) -> 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 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(),
}
}
}