#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
AccessDeniedException(crate::types::error::AccessDeniedException),
ConflictException(crate::types::error::ConflictException),
InternalServerException(crate::types::error::InternalServerException),
ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
ThrottlingException(crate::types::error::ThrottlingException),
UnauthorizedException(crate::types::error::UnauthorizedException),
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::AccessDeniedException(inner) => inner.fmt(f),
Error::ConflictException(inner) => inner.fmt(f),
Error::InternalServerException(inner) => inner.fmt(f),
Error::ResourceNotFoundException(inner) => inner.fmt(f),
Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
Error::ThrottlingException(inner) => inner.fmt(f),
Error::UnauthorizedException(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::AccessDeniedException(inner) => inner.meta(),
Self::ConflictException(inner) => inner.meta(),
Self::InternalServerException(inner) => inner.meta(),
Self::ResourceNotFoundException(inner) => inner.meta(),
Self::ServiceQuotaExceededException(inner) => inner.meta(),
Self::ThrottlingException(inner) => inner.meta(),
Self::UnauthorizedException(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::associate_default_view::AssociateDefaultViewError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_default_view::AssociateDefaultViewError, 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::associate_default_view::AssociateDefaultViewError> for Error {
fn from(err: crate::operation::associate_default_view::AssociateDefaultViewError) -> Self {
match err {
crate::operation::associate_default_view::AssociateDefaultViewError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::associate_default_view::AssociateDefaultViewError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::associate_default_view::AssociateDefaultViewError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::associate_default_view::AssociateDefaultViewError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::associate_default_view::AssociateDefaultViewError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::associate_default_view::AssociateDefaultViewError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_view::BatchGetViewError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_view::BatchGetViewError, 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::batch_get_view::BatchGetViewError> for Error {
fn from(err: crate::operation::batch_get_view::BatchGetViewError) -> Self {
match err {
crate::operation::batch_get_view::BatchGetViewError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::batch_get_view::BatchGetViewError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::batch_get_view::BatchGetViewError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::batch_get_view::BatchGetViewError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
crate::operation::batch_get_view::BatchGetViewError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::batch_get_view::BatchGetViewError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_index::CreateIndexError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_index::CreateIndexError, 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_index::CreateIndexError> for Error {
fn from(err: crate::operation::create_index::CreateIndexError) -> Self {
match err {
crate::operation::create_index::CreateIndexError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::create_index::CreateIndexError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::create_index::CreateIndexError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::create_index::CreateIndexError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::create_index::CreateIndexError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_index::CreateIndexError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_view::CreateViewError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_view::CreateViewError, 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_view::CreateViewError> for Error {
fn from(err: crate::operation::create_view::CreateViewError) -> Self {
match err {
crate::operation::create_view::CreateViewError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::create_view::CreateViewError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::create_view::CreateViewError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::create_view::CreateViewError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
crate::operation::create_view::CreateViewError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::create_view::CreateViewError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
crate::operation::create_view::CreateViewError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_view::CreateViewError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_index::DeleteIndexError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_index::DeleteIndexError, 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_index::DeleteIndexError> for Error {
fn from(err: crate::operation::delete_index::DeleteIndexError) -> Self {
match err {
crate::operation::delete_index::DeleteIndexError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::delete_index::DeleteIndexError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::delete_index::DeleteIndexError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::delete_index::DeleteIndexError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::delete_index::DeleteIndexError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_index::DeleteIndexError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_view::DeleteViewError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_view::DeleteViewError, 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_view::DeleteViewError> for Error {
fn from(err: crate::operation::delete_view::DeleteViewError) -> Self {
match err {
crate::operation::delete_view::DeleteViewError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::delete_view::DeleteViewError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::delete_view::DeleteViewError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::delete_view::DeleteViewError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::delete_view::DeleteViewError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
crate::operation::delete_view::DeleteViewError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_view::DeleteViewError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_default_view::DisassociateDefaultViewError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_default_view::DisassociateDefaultViewError, 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::disassociate_default_view::DisassociateDefaultViewError> for Error {
fn from(err: crate::operation::disassociate_default_view::DisassociateDefaultViewError) -> Self {
match err {
crate::operation::disassociate_default_view::DisassociateDefaultViewError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::disassociate_default_view::DisassociateDefaultViewError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::disassociate_default_view::DisassociateDefaultViewError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::disassociate_default_view::DisassociateDefaultViewError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::disassociate_default_view::DisassociateDefaultViewError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::disassociate_default_view::DisassociateDefaultViewError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::get_account_level_service_configuration::GetAccountLevelServiceConfigurationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::get_account_level_service_configuration::GetAccountLevelServiceConfigurationError,
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_account_level_service_configuration::GetAccountLevelServiceConfigurationError> for Error {
fn from(err: crate::operation::get_account_level_service_configuration::GetAccountLevelServiceConfigurationError) -> Self {
match err {
crate::operation::get_account_level_service_configuration::GetAccountLevelServiceConfigurationError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::get_account_level_service_configuration::GetAccountLevelServiceConfigurationError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::get_account_level_service_configuration::GetAccountLevelServiceConfigurationError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::get_account_level_service_configuration::GetAccountLevelServiceConfigurationError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::get_account_level_service_configuration::GetAccountLevelServiceConfigurationError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_default_view::GetDefaultViewError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_default_view::GetDefaultViewError, 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_default_view::GetDefaultViewError> for Error {
fn from(err: crate::operation::get_default_view::GetDefaultViewError) -> Self {
match err {
crate::operation::get_default_view::GetDefaultViewError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_default_view::GetDefaultViewError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_default_view::GetDefaultViewError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_default_view::GetDefaultViewError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_default_view::GetDefaultViewError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_default_view::GetDefaultViewError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_index::GetIndexError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_index::GetIndexError, 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_index::GetIndexError> for Error {
fn from(err: crate::operation::get_index::GetIndexError) -> Self {
match err {
crate::operation::get_index::GetIndexError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_index::GetIndexError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_index::GetIndexError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_index::GetIndexError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_index::GetIndexError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_index::GetIndexError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_managed_view::GetManagedViewError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_managed_view::GetManagedViewError, 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_managed_view::GetManagedViewError> for Error {
fn from(err: crate::operation::get_managed_view::GetManagedViewError) -> Self {
match err {
crate::operation::get_managed_view::GetManagedViewError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_managed_view::GetManagedViewError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_managed_view::GetManagedViewError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_managed_view::GetManagedViewError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_managed_view::GetManagedViewError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
crate::operation::get_managed_view::GetManagedViewError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_managed_view::GetManagedViewError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_view::GetViewError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_view::GetViewError, 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_view::GetViewError> for Error {
fn from(err: crate::operation::get_view::GetViewError) -> Self {
match err {
crate::operation::get_view::GetViewError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_view::GetViewError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_view::GetViewError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_view::GetViewError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_view::GetViewError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
crate::operation::get_view::GetViewError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_view::GetViewError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_indexes::ListIndexesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_indexes::ListIndexesError, 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_indexes::ListIndexesError> for Error {
fn from(err: crate::operation::list_indexes::ListIndexesError) -> Self {
match err {
crate::operation::list_indexes::ListIndexesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_indexes::ListIndexesError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_indexes::ListIndexesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_indexes::ListIndexesError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_indexes::ListIndexesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_indexes_for_members::ListIndexesForMembersError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_indexes_for_members::ListIndexesForMembersError, 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_indexes_for_members::ListIndexesForMembersError> for Error {
fn from(err: crate::operation::list_indexes_for_members::ListIndexesForMembersError) -> Self {
match err {
crate::operation::list_indexes_for_members::ListIndexesForMembersError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::list_indexes_for_members::ListIndexesForMembersError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::list_indexes_for_members::ListIndexesForMembersError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_indexes_for_members::ListIndexesForMembersError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_indexes_for_members::ListIndexesForMembersError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_managed_views::ListManagedViewsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_managed_views::ListManagedViewsError, 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_managed_views::ListManagedViewsError> for Error {
fn from(err: crate::operation::list_managed_views::ListManagedViewsError) -> Self {
match err {
crate::operation::list_managed_views::ListManagedViewsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_managed_views::ListManagedViewsError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_managed_views::ListManagedViewsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_managed_views::ListManagedViewsError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
crate::operation::list_managed_views::ListManagedViewsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_managed_views::ListManagedViewsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_resources::ListResourcesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_resources::ListResourcesError, 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_resources::ListResourcesError> for Error {
fn from(err: crate::operation::list_resources::ListResourcesError) -> Self {
match err {
crate::operation::list_resources::ListResourcesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_resources::ListResourcesError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_resources::ListResourcesError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::list_resources::ListResourcesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_resources::ListResourcesError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
crate::operation::list_resources::ListResourcesError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_resources::ListResourcesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_supported_resource_types::ListSupportedResourceTypesError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_supported_resource_types::ListSupportedResourceTypesError, 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_supported_resource_types::ListSupportedResourceTypesError> for Error {
fn from(err: crate::operation::list_supported_resource_types::ListSupportedResourceTypesError) -> Self {
match err {
crate::operation::list_supported_resource_types::ListSupportedResourceTypesError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::list_supported_resource_types::ListSupportedResourceTypesError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::list_supported_resource_types::ListSupportedResourceTypesError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::list_supported_resource_types::ListSupportedResourceTypesError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::list_supported_resource_types::ListSupportedResourceTypesError::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::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_tags_for_resource::ListTagsForResourceError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(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::list_views::ListViewsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_views::ListViewsError, 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_views::ListViewsError> for Error {
fn from(err: crate::operation::list_views::ListViewsError) -> Self {
match err {
crate::operation::list_views::ListViewsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_views::ListViewsError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_views::ListViewsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_views::ListViewsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_views::ListViewsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::search::SearchError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::search::SearchError, 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::search::SearchError> for Error {
fn from(err: crate::operation::search::SearchError) -> Self {
match err {
crate::operation::search::SearchError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::search::SearchError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::search::SearchError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::search::SearchError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::search::SearchError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
crate::operation::search::SearchError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::search::SearchError::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::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::tag_resource::TagResourceError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::tag_resource::TagResourceError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
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::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::untag_resource::UntagResourceError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_index_type::UpdateIndexTypeError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_index_type::UpdateIndexTypeError, 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_index_type::UpdateIndexTypeError> for Error {
fn from(err: crate::operation::update_index_type::UpdateIndexTypeError) -> Self {
match err {
crate::operation::update_index_type::UpdateIndexTypeError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::update_index_type::UpdateIndexTypeError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::update_index_type::UpdateIndexTypeError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::update_index_type::UpdateIndexTypeError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::update_index_type::UpdateIndexTypeError::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::operation::update_index_type::UpdateIndexTypeError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::update_index_type::UpdateIndexTypeError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::update_index_type::UpdateIndexTypeError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_view::UpdateViewError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_view::UpdateViewError, 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_view::UpdateViewError> for Error {
fn from(err: crate::operation::update_view::UpdateViewError) -> Self {
match err {
crate::operation::update_view::UpdateViewError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::update_view::UpdateViewError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::update_view::UpdateViewError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
crate::operation::update_view::UpdateViewError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::update_view::UpdateViewError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
crate::operation::update_view::UpdateViewError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::update_view::UpdateViewError::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::AccessDeniedException(inner) => inner.source(),
Error::ConflictException(inner) => inner.source(),
Error::InternalServerException(inner) => inner.source(),
Error::ResourceNotFoundException(inner) => inner.source(),
Error::ServiceQuotaExceededException(inner) => inner.source(),
Error::ThrottlingException(inner) => inner.source(),
Error::UnauthorizedException(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::AccessDeniedException(e) => e.request_id(),
Self::ConflictException(e) => e.request_id(),
Self::InternalServerException(e) => e.request_id(),
Self::ResourceNotFoundException(e) => e.request_id(),
Self::ServiceQuotaExceededException(e) => e.request_id(),
Self::ThrottlingException(e) => e.request_id(),
Self::UnauthorizedException(e) => e.request_id(),
Self::ValidationException(e) => e.request_id(),
Self::Unhandled(e) => e.meta.request_id(),
}
}
}