#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
InternalServerException(crate::types::error::InternalServerException),
InvalidParameterException(crate::types::error::InvalidParameterException),
ResourceConflictException(crate::types::error::ResourceConflictException),
ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
ThrottlingException(crate::types::error::ThrottlingException),
UnauthorizedException(crate::types::error::UnauthorizedException),
#[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::InternalServerException(inner) => inner.fmt(f),
Error::InvalidParameterException(inner) => inner.fmt(f),
Error::ResourceConflictException(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::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::InternalServerException(inner) => inner.meta(),
Self::InvalidParameterException(inner) => inner.meta(),
Self::ResourceConflictException(inner) => inner.meta(),
Self::ResourceNotFoundException(inner) => inner.meta(),
Self::ServiceQuotaExceededException(inner) => inner.meta(),
Self::ThrottlingException(inner) => inner.meta(),
Self::UnauthorizedException(inner) => inner.meta(),
Self::Unhandled(inner) => &inner.meta,
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_component::CreateComponentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_component::CreateComponentError, 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_component::CreateComponentError> for Error {
fn from(err: crate::operation::create_component::CreateComponentError) -> Self {
match err {
crate::operation::create_component::CreateComponentError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::create_component::CreateComponentError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::create_component::CreateComponentError::ResourceConflictException(inner) => Error::ResourceConflictException(inner),
crate::operation::create_component::CreateComponentError::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::operation::create_component::CreateComponentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_form::CreateFormError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_form::CreateFormError, 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_form::CreateFormError> for Error {
fn from(err: crate::operation::create_form::CreateFormError) -> Self {
match err {
crate::operation::create_form::CreateFormError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::create_form::CreateFormError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::create_form::CreateFormError::ResourceConflictException(inner) => Error::ResourceConflictException(inner),
crate::operation::create_form::CreateFormError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
crate::operation::create_form::CreateFormError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_theme::CreateThemeError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_theme::CreateThemeError, 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_theme::CreateThemeError> for Error {
fn from(err: crate::operation::create_theme::CreateThemeError) -> Self {
match err {
crate::operation::create_theme::CreateThemeError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::create_theme::CreateThemeError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::create_theme::CreateThemeError::ResourceConflictException(inner) => Error::ResourceConflictException(inner),
crate::operation::create_theme::CreateThemeError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
crate::operation::create_theme::CreateThemeError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_component::DeleteComponentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_component::DeleteComponentError, 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_component::DeleteComponentError> for Error {
fn from(err: crate::operation::delete_component::DeleteComponentError) -> Self {
match err {
crate::operation::delete_component::DeleteComponentError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::delete_component::DeleteComponentError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::delete_component::DeleteComponentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::delete_component::DeleteComponentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_form::DeleteFormError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_form::DeleteFormError, 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_form::DeleteFormError> for Error {
fn from(err: crate::operation::delete_form::DeleteFormError) -> Self {
match err {
crate::operation::delete_form::DeleteFormError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::delete_form::DeleteFormError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::delete_form::DeleteFormError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::delete_form::DeleteFormError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_theme::DeleteThemeError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_theme::DeleteThemeError, 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_theme::DeleteThemeError> for Error {
fn from(err: crate::operation::delete_theme::DeleteThemeError) -> Self {
match err {
crate::operation::delete_theme::DeleteThemeError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::delete_theme::DeleteThemeError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::delete_theme::DeleteThemeError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::delete_theme::DeleteThemeError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::exchange_code_for_token::ExchangeCodeForTokenError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::exchange_code_for_token::ExchangeCodeForTokenError, 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::exchange_code_for_token::ExchangeCodeForTokenError> for Error {
fn from(err: crate::operation::exchange_code_for_token::ExchangeCodeForTokenError) -> Self {
match err {
crate::operation::exchange_code_for_token::ExchangeCodeForTokenError::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::operation::exchange_code_for_token::ExchangeCodeForTokenError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::export_components::ExportComponentsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::export_components::ExportComponentsError, 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::export_components::ExportComponentsError> for Error {
fn from(err: crate::operation::export_components::ExportComponentsError) -> Self {
match err {
crate::operation::export_components::ExportComponentsError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::export_components::ExportComponentsError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::export_components::ExportComponentsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::export_forms::ExportFormsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::export_forms::ExportFormsError, 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::export_forms::ExportFormsError> for Error {
fn from(err: crate::operation::export_forms::ExportFormsError) -> Self {
match err {
crate::operation::export_forms::ExportFormsError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::export_forms::ExportFormsError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::export_forms::ExportFormsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::export_themes::ExportThemesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::export_themes::ExportThemesError, 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::export_themes::ExportThemesError> for Error {
fn from(err: crate::operation::export_themes::ExportThemesError) -> Self {
match err {
crate::operation::export_themes::ExportThemesError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::export_themes::ExportThemesError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::export_themes::ExportThemesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_codegen_job::GetCodegenJobError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_codegen_job::GetCodegenJobError, 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_codegen_job::GetCodegenJobError> for Error {
fn from(err: crate::operation::get_codegen_job::GetCodegenJobError) -> Self {
match err {
crate::operation::get_codegen_job::GetCodegenJobError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_codegen_job::GetCodegenJobError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::get_codegen_job::GetCodegenJobError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_codegen_job::GetCodegenJobError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_codegen_job::GetCodegenJobError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_component::GetComponentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_component::GetComponentError, 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_component::GetComponentError> for Error {
fn from(err: crate::operation::get_component::GetComponentError) -> Self {
match err {
crate::operation::get_component::GetComponentError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_component::GetComponentError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::get_component::GetComponentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_component::GetComponentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_form::GetFormError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_form::GetFormError, 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_form::GetFormError> for Error {
fn from(err: crate::operation::get_form::GetFormError) -> Self {
match err {
crate::operation::get_form::GetFormError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_form::GetFormError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::get_form::GetFormError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_form::GetFormError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_metadata::GetMetadataError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_metadata::GetMetadataError, 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_metadata::GetMetadataError> for Error {
fn from(err: crate::operation::get_metadata::GetMetadataError) -> Self {
match err {
crate::operation::get_metadata::GetMetadataError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::get_metadata::GetMetadataError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
crate::operation::get_metadata::GetMetadataError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_theme::GetThemeError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_theme::GetThemeError, 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_theme::GetThemeError> for Error {
fn from(err: crate::operation::get_theme::GetThemeError) -> Self {
match err {
crate::operation::get_theme::GetThemeError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_theme::GetThemeError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::get_theme::GetThemeError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_theme::GetThemeError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_codegen_jobs::ListCodegenJobsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_codegen_jobs::ListCodegenJobsError, 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_codegen_jobs::ListCodegenJobsError> for Error {
fn from(err: crate::operation::list_codegen_jobs::ListCodegenJobsError) -> Self {
match err {
crate::operation::list_codegen_jobs::ListCodegenJobsError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_codegen_jobs::ListCodegenJobsError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::list_codegen_jobs::ListCodegenJobsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_codegen_jobs::ListCodegenJobsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_components::ListComponentsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_components::ListComponentsError, 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_components::ListComponentsError> for Error {
fn from(err: crate::operation::list_components::ListComponentsError) -> Self {
match err {
crate::operation::list_components::ListComponentsError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_components::ListComponentsError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::list_components::ListComponentsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_forms::ListFormsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_forms::ListFormsError, 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_forms::ListFormsError> for Error {
fn from(err: crate::operation::list_forms::ListFormsError) -> Self {
match err {
crate::operation::list_forms::ListFormsError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_forms::ListFormsError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::list_forms::ListFormsError::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::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::list_tags_for_resource::ListTagsForResourceError::InvalidParameterException(inner) => {
Error::InvalidParameterException(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::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_themes::ListThemesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_themes::ListThemesError, 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_themes::ListThemesError> for Error {
fn from(err: crate::operation::list_themes::ListThemesError) -> Self {
match err {
crate::operation::list_themes::ListThemesError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_themes::ListThemesError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::list_themes::ListThemesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_metadata_flag::PutMetadataFlagError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_metadata_flag::PutMetadataFlagError, 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::put_metadata_flag::PutMetadataFlagError> for Error {
fn from(err: crate::operation::put_metadata_flag::PutMetadataFlagError) -> Self {
match err {
crate::operation::put_metadata_flag::PutMetadataFlagError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::put_metadata_flag::PutMetadataFlagError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
crate::operation::put_metadata_flag::PutMetadataFlagError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::refresh_token::RefreshTokenError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::refresh_token::RefreshTokenError, 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::refresh_token::RefreshTokenError> for Error {
fn from(err: crate::operation::refresh_token::RefreshTokenError) -> Self {
match err {
crate::operation::refresh_token::RefreshTokenError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::refresh_token::RefreshTokenError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_codegen_job::StartCodegenJobError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_codegen_job::StartCodegenJobError, 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_codegen_job::StartCodegenJobError> for Error {
fn from(err: crate::operation::start_codegen_job::StartCodegenJobError) -> Self {
match err {
crate::operation::start_codegen_job::StartCodegenJobError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::start_codegen_job::StartCodegenJobError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::start_codegen_job::StartCodegenJobError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::start_codegen_job::StartCodegenJobError::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::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::tag_resource::TagResourceError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(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::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::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::untag_resource::UntagResourceError::InvalidParameterException(inner) => Error::InvalidParameterException(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::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_component::UpdateComponentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_component::UpdateComponentError, 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_component::UpdateComponentError> for Error {
fn from(err: crate::operation::update_component::UpdateComponentError) -> Self {
match err {
crate::operation::update_component::UpdateComponentError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::update_component::UpdateComponentError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::update_component::UpdateComponentError::ResourceConflictException(inner) => Error::ResourceConflictException(inner),
crate::operation::update_component::UpdateComponentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_form::UpdateFormError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_form::UpdateFormError, 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_form::UpdateFormError> for Error {
fn from(err: crate::operation::update_form::UpdateFormError) -> Self {
match err {
crate::operation::update_form::UpdateFormError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::update_form::UpdateFormError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::update_form::UpdateFormError::ResourceConflictException(inner) => Error::ResourceConflictException(inner),
crate::operation::update_form::UpdateFormError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_theme::UpdateThemeError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_theme::UpdateThemeError, 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_theme::UpdateThemeError> for Error {
fn from(err: crate::operation::update_theme::UpdateThemeError) -> Self {
match err {
crate::operation::update_theme::UpdateThemeError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::update_theme::UpdateThemeError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::update_theme::UpdateThemeError::ResourceConflictException(inner) => Error::ResourceConflictException(inner),
crate::operation::update_theme::UpdateThemeError::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::InternalServerException(inner) => inner.source(),
Error::InvalidParameterException(inner) => inner.source(),
Error::ResourceConflictException(inner) => inner.source(),
Error::ResourceNotFoundException(inner) => inner.source(),
Error::ServiceQuotaExceededException(inner) => inner.source(),
Error::ThrottlingException(inner) => inner.source(),
Error::UnauthorizedException(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::InternalServerException(e) => e.request_id(),
Self::InvalidParameterException(e) => e.request_id(),
Self::ResourceConflictException(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::Unhandled(e) => e.meta.request_id(),
}
}
}