#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
ConflictException(crate::types::error::ConflictException),
ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
ValidationException(crate::types::error::ValidationException),
#[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::ConflictException(inner) => inner.fmt(f),
Error::ResourceNotFoundException(inner) => inner.fmt(f),
Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
Error::ValidationException(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::ConflictException(inner) => inner.meta(),
Self::ResourceNotFoundException(inner) => inner.meta(),
Self::ServiceQuotaExceededException(inner) => inner.meta(),
Self::ValidationException(inner) => inner.meta(),
Self::Unhandled(inner) => &inner.meta,
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_experiment_template::CreateExperimentTemplateError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_experiment_template::CreateExperimentTemplateError, 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_experiment_template::CreateExperimentTemplateError> for Error {
fn from(err: crate::operation::create_experiment_template::CreateExperimentTemplateError) -> Self {
match err {
crate::operation::create_experiment_template::CreateExperimentTemplateError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::create_experiment_template::CreateExperimentTemplateError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::create_experiment_template::CreateExperimentTemplateError::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::operation::create_experiment_template::CreateExperimentTemplateError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::create_experiment_template::CreateExperimentTemplateError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::create_target_account_configuration::CreateTargetAccountConfigurationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::create_target_account_configuration::CreateTargetAccountConfigurationError,
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_target_account_configuration::CreateTargetAccountConfigurationError> for Error {
fn from(err: crate::operation::create_target_account_configuration::CreateTargetAccountConfigurationError) -> Self {
match err {
crate::operation::create_target_account_configuration::CreateTargetAccountConfigurationError::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::operation::create_target_account_configuration::CreateTargetAccountConfigurationError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::create_target_account_configuration::CreateTargetAccountConfigurationError::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::operation::create_target_account_configuration::CreateTargetAccountConfigurationError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::create_target_account_configuration::CreateTargetAccountConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_experiment_template::DeleteExperimentTemplateError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_experiment_template::DeleteExperimentTemplateError, 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_experiment_template::DeleteExperimentTemplateError> for Error {
fn from(err: crate::operation::delete_experiment_template::DeleteExperimentTemplateError) -> Self {
match err {
crate::operation::delete_experiment_template::DeleteExperimentTemplateError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_experiment_template::DeleteExperimentTemplateError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::delete_experiment_template::DeleteExperimentTemplateError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::delete_target_account_configuration::DeleteTargetAccountConfigurationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::delete_target_account_configuration::DeleteTargetAccountConfigurationError,
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_target_account_configuration::DeleteTargetAccountConfigurationError> for Error {
fn from(err: crate::operation::delete_target_account_configuration::DeleteTargetAccountConfigurationError) -> Self {
match err {
crate::operation::delete_target_account_configuration::DeleteTargetAccountConfigurationError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_target_account_configuration::DeleteTargetAccountConfigurationError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::delete_target_account_configuration::DeleteTargetAccountConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_action::GetActionError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_action::GetActionError, 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::get_action::GetActionError> for Error {
fn from(err: crate::operation::get_action::GetActionError) -> Self {
match err {
crate::operation::get_action::GetActionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_action::GetActionError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_action::GetActionError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_experiment::GetExperimentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_experiment::GetExperimentError, 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::get_experiment::GetExperimentError> for Error {
fn from(err: crate::operation::get_experiment::GetExperimentError) -> Self {
match err {
crate::operation::get_experiment::GetExperimentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_experiment::GetExperimentError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_experiment::GetExperimentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::get_experiment_target_account_configuration::GetExperimentTargetAccountConfigurationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::get_experiment_target_account_configuration::GetExperimentTargetAccountConfigurationError,
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::get_experiment_target_account_configuration::GetExperimentTargetAccountConfigurationError> for Error {
fn from(err: crate::operation::get_experiment_target_account_configuration::GetExperimentTargetAccountConfigurationError) -> Self {
match err {
crate::operation::get_experiment_target_account_configuration::GetExperimentTargetAccountConfigurationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_experiment_target_account_configuration::GetExperimentTargetAccountConfigurationError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_experiment_target_account_configuration::GetExperimentTargetAccountConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_experiment_template::GetExperimentTemplateError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_experiment_template::GetExperimentTemplateError, 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::get_experiment_template::GetExperimentTemplateError> for Error {
fn from(err: crate::operation::get_experiment_template::GetExperimentTemplateError) -> Self {
match err {
crate::operation::get_experiment_template::GetExperimentTemplateError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::get_experiment_template::GetExperimentTemplateError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_experiment_template::GetExperimentTemplateError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_safety_lever::GetSafetyLeverError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_safety_lever::GetSafetyLeverError, 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::get_safety_lever::GetSafetyLeverError> for Error {
fn from(err: crate::operation::get_safety_lever::GetSafetyLeverError) -> Self {
match err {
crate::operation::get_safety_lever::GetSafetyLeverError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_safety_lever::GetSafetyLeverError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_target_account_configuration::GetTargetAccountConfigurationError, R>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::get_target_account_configuration::GetTargetAccountConfigurationError,
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::get_target_account_configuration::GetTargetAccountConfigurationError> for Error {
fn from(err: crate::operation::get_target_account_configuration::GetTargetAccountConfigurationError) -> Self {
match err {
crate::operation::get_target_account_configuration::GetTargetAccountConfigurationError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::get_target_account_configuration::GetTargetAccountConfigurationError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::get_target_account_configuration::GetTargetAccountConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_target_resource_type::GetTargetResourceTypeError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_target_resource_type::GetTargetResourceTypeError, 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::get_target_resource_type::GetTargetResourceTypeError> for Error {
fn from(err: crate::operation::get_target_resource_type::GetTargetResourceTypeError) -> Self {
match err {
crate::operation::get_target_resource_type::GetTargetResourceTypeError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::get_target_resource_type::GetTargetResourceTypeError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_target_resource_type::GetTargetResourceTypeError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_actions::ListActionsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_actions::ListActionsError, 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_actions::ListActionsError> for Error {
fn from(err: crate::operation::list_actions::ListActionsError) -> Self {
match err {
crate::operation::list_actions::ListActionsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_actions::ListActionsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_experiment_resolved_targets::ListExperimentResolvedTargetsError, R>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::list_experiment_resolved_targets::ListExperimentResolvedTargetsError,
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_experiment_resolved_targets::ListExperimentResolvedTargetsError> for Error {
fn from(err: crate::operation::list_experiment_resolved_targets::ListExperimentResolvedTargetsError) -> Self {
match err {
crate::operation::list_experiment_resolved_targets::ListExperimentResolvedTargetsError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::list_experiment_resolved_targets::ListExperimentResolvedTargetsError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::list_experiment_resolved_targets::ListExperimentResolvedTargetsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_experiments::ListExperimentsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_experiments::ListExperimentsError, 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_experiments::ListExperimentsError> for Error {
fn from(err: crate::operation::list_experiments::ListExperimentsError) -> Self {
match err {
crate::operation::list_experiments::ListExperimentsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_experiments::ListExperimentsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::list_experiment_target_account_configurations::ListExperimentTargetAccountConfigurationsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::list_experiment_target_account_configurations::ListExperimentTargetAccountConfigurationsError,
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_experiment_target_account_configurations::ListExperimentTargetAccountConfigurationsError> for Error {
fn from(err: crate::operation::list_experiment_target_account_configurations::ListExperimentTargetAccountConfigurationsError) -> Self {
match err {
crate::operation::list_experiment_target_account_configurations::ListExperimentTargetAccountConfigurationsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::list_experiment_target_account_configurations::ListExperimentTargetAccountConfigurationsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_experiment_target_account_configurations::ListExperimentTargetAccountConfigurationsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_experiment_templates::ListExperimentTemplatesError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_experiment_templates::ListExperimentTemplatesError, 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_experiment_templates::ListExperimentTemplatesError> for Error {
fn from(err: crate::operation::list_experiment_templates::ListExperimentTemplatesError) -> Self {
match err {
crate::operation::list_experiment_templates::ListExperimentTemplatesError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::list_experiment_templates::ListExperimentTemplatesError::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::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::list_target_account_configurations::ListTargetAccountConfigurationsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::list_target_account_configurations::ListTargetAccountConfigurationsError,
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_target_account_configurations::ListTargetAccountConfigurationsError> for Error {
fn from(err: crate::operation::list_target_account_configurations::ListTargetAccountConfigurationsError) -> Self {
match err {
crate::operation::list_target_account_configurations::ListTargetAccountConfigurationsError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::list_target_account_configurations::ListTargetAccountConfigurationsError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::list_target_account_configurations::ListTargetAccountConfigurationsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_target_resource_types::ListTargetResourceTypesError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_target_resource_types::ListTargetResourceTypesError, 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_target_resource_types::ListTargetResourceTypesError> for Error {
fn from(err: crate::operation::list_target_resource_types::ListTargetResourceTypesError) -> Self {
match err {
crate::operation::list_target_resource_types::ListTargetResourceTypesError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::list_target_resource_types::ListTargetResourceTypesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_experiment::StartExperimentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_experiment::StartExperimentError, 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::start_experiment::StartExperimentError> for Error {
fn from(err: crate::operation::start_experiment::StartExperimentError) -> Self {
match err {
crate::operation::start_experiment::StartExperimentError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::start_experiment::StartExperimentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::start_experiment::StartExperimentError::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::operation::start_experiment::StartExperimentError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::start_experiment::StartExperimentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_experiment::StopExperimentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_experiment::StopExperimentError, 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::stop_experiment::StopExperimentError> for Error {
fn from(err: crate::operation::stop_experiment::StopExperimentError) -> Self {
match err {
crate::operation::stop_experiment::StopExperimentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::stop_experiment::StopExperimentError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::stop_experiment::StopExperimentError::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::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::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_experiment_template::UpdateExperimentTemplateError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_experiment_template::UpdateExperimentTemplateError, 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_experiment_template::UpdateExperimentTemplateError> for Error {
fn from(err: crate::operation::update_experiment_template::UpdateExperimentTemplateError) -> Self {
match err {
crate::operation::update_experiment_template::UpdateExperimentTemplateError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_experiment_template::UpdateExperimentTemplateError::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::operation::update_experiment_template::UpdateExperimentTemplateError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::update_experiment_template::UpdateExperimentTemplateError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_safety_lever_state::UpdateSafetyLeverStateError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_safety_lever_state::UpdateSafetyLeverStateError, 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_safety_lever_state::UpdateSafetyLeverStateError> for Error {
fn from(err: crate::operation::update_safety_lever_state::UpdateSafetyLeverStateError) -> Self {
match err {
crate::operation::update_safety_lever_state::UpdateSafetyLeverStateError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::update_safety_lever_state::UpdateSafetyLeverStateError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_safety_lever_state::UpdateSafetyLeverStateError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::update_safety_lever_state::UpdateSafetyLeverStateError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_target_account_configuration::UpdateTargetAccountConfigurationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_target_account_configuration::UpdateTargetAccountConfigurationError,
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_target_account_configuration::UpdateTargetAccountConfigurationError> for Error {
fn from(err: crate::operation::update_target_account_configuration::UpdateTargetAccountConfigurationError) -> Self {
match err {
crate::operation::update_target_account_configuration::UpdateTargetAccountConfigurationError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_target_account_configuration::UpdateTargetAccountConfigurationError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::update_target_account_configuration::UpdateTargetAccountConfigurationError::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::ConflictException(inner) => inner.source(),
Error::ResourceNotFoundException(inner) => inner.source(),
Error::ServiceQuotaExceededException(inner) => inner.source(),
Error::ValidationException(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::ConflictException(e) => e.request_id(),
Self::ResourceNotFoundException(e) => e.request_id(),
Self::ServiceQuotaExceededException(e) => e.request_id(),
Self::ValidationException(e) => e.request_id(),
Self::Unhandled(e) => e.meta.request_id(),
}
}
}