#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
AttachmentIdNotFound(crate::types::error::AttachmentIdNotFound),
AttachmentLimitExceeded(crate::types::error::AttachmentLimitExceeded),
AttachmentSetExpired(crate::types::error::AttachmentSetExpired),
AttachmentSetIdNotFound(crate::types::error::AttachmentSetIdNotFound),
AttachmentSetSizeLimitExceeded(crate::types::error::AttachmentSetSizeLimitExceeded),
CaseCreationLimitExceeded(crate::types::error::CaseCreationLimitExceeded),
CaseIdNotFound(crate::types::error::CaseIdNotFound),
DescribeAttachmentLimitExceeded(crate::types::error::DescribeAttachmentLimitExceeded),
InternalServerError(crate::types::error::InternalServerError),
ThrottlingException(crate::types::error::ThrottlingException),
#[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::AttachmentIdNotFound(inner) => inner.fmt(f),
Error::AttachmentLimitExceeded(inner) => inner.fmt(f),
Error::AttachmentSetExpired(inner) => inner.fmt(f),
Error::AttachmentSetIdNotFound(inner) => inner.fmt(f),
Error::AttachmentSetSizeLimitExceeded(inner) => inner.fmt(f),
Error::CaseCreationLimitExceeded(inner) => inner.fmt(f),
Error::CaseIdNotFound(inner) => inner.fmt(f),
Error::DescribeAttachmentLimitExceeded(inner) => inner.fmt(f),
Error::InternalServerError(inner) => inner.fmt(f),
Error::ThrottlingException(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::AttachmentIdNotFound(inner) => inner.meta(),
Self::AttachmentLimitExceeded(inner) => inner.meta(),
Self::AttachmentSetExpired(inner) => inner.meta(),
Self::AttachmentSetIdNotFound(inner) => inner.meta(),
Self::AttachmentSetSizeLimitExceeded(inner) => inner.meta(),
Self::CaseCreationLimitExceeded(inner) => inner.meta(),
Self::CaseIdNotFound(inner) => inner.meta(),
Self::DescribeAttachmentLimitExceeded(inner) => inner.meta(),
Self::InternalServerError(inner) => inner.meta(),
Self::ThrottlingException(inner) => inner.meta(),
Self::Unhandled(inner) => &inner.meta,
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::add_attachments_to_set::AddAttachmentsToSetError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::add_attachments_to_set::AddAttachmentsToSetError, 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::add_attachments_to_set::AddAttachmentsToSetError> for Error {
fn from(err: crate::operation::add_attachments_to_set::AddAttachmentsToSetError) -> Self {
match err {
crate::operation::add_attachments_to_set::AddAttachmentsToSetError::AttachmentLimitExceeded(inner) => {
Error::AttachmentLimitExceeded(inner)
}
crate::operation::add_attachments_to_set::AddAttachmentsToSetError::AttachmentSetExpired(inner) => Error::AttachmentSetExpired(inner),
crate::operation::add_attachments_to_set::AddAttachmentsToSetError::AttachmentSetIdNotFound(inner) => {
Error::AttachmentSetIdNotFound(inner)
}
crate::operation::add_attachments_to_set::AddAttachmentsToSetError::AttachmentSetSizeLimitExceeded(inner) => {
Error::AttachmentSetSizeLimitExceeded(inner)
}
crate::operation::add_attachments_to_set::AddAttachmentsToSetError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::add_attachments_to_set::AddAttachmentsToSetError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::add_communication_to_case::AddCommunicationToCaseError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::add_communication_to_case::AddCommunicationToCaseError, 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::add_communication_to_case::AddCommunicationToCaseError> for Error {
fn from(err: crate::operation::add_communication_to_case::AddCommunicationToCaseError) -> Self {
match err {
crate::operation::add_communication_to_case::AddCommunicationToCaseError::AttachmentSetExpired(inner) => {
Error::AttachmentSetExpired(inner)
}
crate::operation::add_communication_to_case::AddCommunicationToCaseError::AttachmentSetIdNotFound(inner) => {
Error::AttachmentSetIdNotFound(inner)
}
crate::operation::add_communication_to_case::AddCommunicationToCaseError::CaseIdNotFound(inner) => Error::CaseIdNotFound(inner),
crate::operation::add_communication_to_case::AddCommunicationToCaseError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::add_communication_to_case::AddCommunicationToCaseError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_case::CreateCaseError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_case::CreateCaseError, 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_case::CreateCaseError> for Error {
fn from(err: crate::operation::create_case::CreateCaseError) -> Self {
match err {
crate::operation::create_case::CreateCaseError::AttachmentSetExpired(inner) => Error::AttachmentSetExpired(inner),
crate::operation::create_case::CreateCaseError::AttachmentSetIdNotFound(inner) => Error::AttachmentSetIdNotFound(inner),
crate::operation::create_case::CreateCaseError::CaseCreationLimitExceeded(inner) => Error::CaseCreationLimitExceeded(inner),
crate::operation::create_case::CreateCaseError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::create_case::CreateCaseError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_attachment::DescribeAttachmentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_attachment::DescribeAttachmentError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_attachment::DescribeAttachmentError> for Error {
fn from(err: crate::operation::describe_attachment::DescribeAttachmentError) -> Self {
match err {
crate::operation::describe_attachment::DescribeAttachmentError::AttachmentIdNotFound(inner) => Error::AttachmentIdNotFound(inner),
crate::operation::describe_attachment::DescribeAttachmentError::DescribeAttachmentLimitExceeded(inner) => {
Error::DescribeAttachmentLimitExceeded(inner)
}
crate::operation::describe_attachment::DescribeAttachmentError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::describe_attachment::DescribeAttachmentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_cases::DescribeCasesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_cases::DescribeCasesError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_cases::DescribeCasesError> for Error {
fn from(err: crate::operation::describe_cases::DescribeCasesError) -> Self {
match err {
crate::operation::describe_cases::DescribeCasesError::CaseIdNotFound(inner) => Error::CaseIdNotFound(inner),
crate::operation::describe_cases::DescribeCasesError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::describe_cases::DescribeCasesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_communications::DescribeCommunicationsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_communications::DescribeCommunicationsError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_communications::DescribeCommunicationsError> for Error {
fn from(err: crate::operation::describe_communications::DescribeCommunicationsError) -> Self {
match err {
crate::operation::describe_communications::DescribeCommunicationsError::CaseIdNotFound(inner) => Error::CaseIdNotFound(inner),
crate::operation::describe_communications::DescribeCommunicationsError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::describe_communications::DescribeCommunicationsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_create_case_options::DescribeCreateCaseOptionsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_create_case_options::DescribeCreateCaseOptionsError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_create_case_options::DescribeCreateCaseOptionsError> for Error {
fn from(err: crate::operation::describe_create_case_options::DescribeCreateCaseOptionsError) -> Self {
match err {
crate::operation::describe_create_case_options::DescribeCreateCaseOptionsError::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::operation::describe_create_case_options::DescribeCreateCaseOptionsError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::describe_create_case_options::DescribeCreateCaseOptionsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_services::DescribeServicesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_services::DescribeServicesError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_services::DescribeServicesError> for Error {
fn from(err: crate::operation::describe_services::DescribeServicesError) -> Self {
match err {
crate::operation::describe_services::DescribeServicesError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::describe_services::DescribeServicesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_severity_levels::DescribeSeverityLevelsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_severity_levels::DescribeSeverityLevelsError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_severity_levels::DescribeSeverityLevelsError> for Error {
fn from(err: crate::operation::describe_severity_levels::DescribeSeverityLevelsError) -> Self {
match err {
crate::operation::describe_severity_levels::DescribeSeverityLevelsError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::describe_severity_levels::DescribeSeverityLevelsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_supported_languages::DescribeSupportedLanguagesError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_supported_languages::DescribeSupportedLanguagesError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_supported_languages::DescribeSupportedLanguagesError> for Error {
fn from(err: crate::operation::describe_supported_languages::DescribeSupportedLanguagesError) -> Self {
match err {
crate::operation::describe_supported_languages::DescribeSupportedLanguagesError::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::operation::describe_supported_languages::DescribeSupportedLanguagesError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::describe_supported_languages::DescribeSupportedLanguagesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::describe_trusted_advisor_check_refresh_statuses::DescribeTrustedAdvisorCheckRefreshStatusesError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::describe_trusted_advisor_check_refresh_statuses::DescribeTrustedAdvisorCheckRefreshStatusesError,
R,
>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_trusted_advisor_check_refresh_statuses::DescribeTrustedAdvisorCheckRefreshStatusesError> for Error {
fn from(err: crate::operation::describe_trusted_advisor_check_refresh_statuses::DescribeTrustedAdvisorCheckRefreshStatusesError) -> Self {
match err {
crate::operation::describe_trusted_advisor_check_refresh_statuses::DescribeTrustedAdvisorCheckRefreshStatusesError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::describe_trusted_advisor_check_refresh_statuses::DescribeTrustedAdvisorCheckRefreshStatusesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::describe_trusted_advisor_check_refresh_statuses::DescribeTrustedAdvisorCheckRefreshStatusesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::describe_trusted_advisor_check_result::DescribeTrustedAdvisorCheckResultError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::describe_trusted_advisor_check_result::DescribeTrustedAdvisorCheckResultError,
R,
>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_trusted_advisor_check_result::DescribeTrustedAdvisorCheckResultError> for Error {
fn from(err: crate::operation::describe_trusted_advisor_check_result::DescribeTrustedAdvisorCheckResultError) -> Self {
match err {
crate::operation::describe_trusted_advisor_check_result::DescribeTrustedAdvisorCheckResultError::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::operation::describe_trusted_advisor_check_result::DescribeTrustedAdvisorCheckResultError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::describe_trusted_advisor_check_result::DescribeTrustedAdvisorCheckResultError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_trusted_advisor_checks::DescribeTrustedAdvisorChecksError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::describe_trusted_advisor_checks::DescribeTrustedAdvisorChecksError,
R,
>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_trusted_advisor_checks::DescribeTrustedAdvisorChecksError> for Error {
fn from(err: crate::operation::describe_trusted_advisor_checks::DescribeTrustedAdvisorChecksError) -> Self {
match err {
crate::operation::describe_trusted_advisor_checks::DescribeTrustedAdvisorChecksError::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::operation::describe_trusted_advisor_checks::DescribeTrustedAdvisorChecksError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::describe_trusted_advisor_checks::DescribeTrustedAdvisorChecksError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesError,
R,
>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesError> for Error {
fn from(err: crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesError) -> Self {
match err {
crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesError::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::refresh_trusted_advisor_check::RefreshTrustedAdvisorCheckError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::refresh_trusted_advisor_check::RefreshTrustedAdvisorCheckError, 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_trusted_advisor_check::RefreshTrustedAdvisorCheckError> for Error {
fn from(err: crate::operation::refresh_trusted_advisor_check::RefreshTrustedAdvisorCheckError) -> Self {
match err {
crate::operation::refresh_trusted_advisor_check::RefreshTrustedAdvisorCheckError::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::operation::refresh_trusted_advisor_check::RefreshTrustedAdvisorCheckError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::resolve_case::ResolveCaseError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::resolve_case::ResolveCaseError, 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::resolve_case::ResolveCaseError> for Error {
fn from(err: crate::operation::resolve_case::ResolveCaseError) -> Self {
match err {
crate::operation::resolve_case::ResolveCaseError::CaseIdNotFound(inner) => Error::CaseIdNotFound(inner),
crate::operation::resolve_case::ResolveCaseError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::resolve_case::ResolveCaseError::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::AttachmentIdNotFound(inner) => inner.source(),
Error::AttachmentLimitExceeded(inner) => inner.source(),
Error::AttachmentSetExpired(inner) => inner.source(),
Error::AttachmentSetIdNotFound(inner) => inner.source(),
Error::AttachmentSetSizeLimitExceeded(inner) => inner.source(),
Error::CaseCreationLimitExceeded(inner) => inner.source(),
Error::CaseIdNotFound(inner) => inner.source(),
Error::DescribeAttachmentLimitExceeded(inner) => inner.source(),
Error::InternalServerError(inner) => inner.source(),
Error::ThrottlingException(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::AttachmentIdNotFound(e) => e.request_id(),
Self::AttachmentLimitExceeded(e) => e.request_id(),
Self::AttachmentSetExpired(e) => e.request_id(),
Self::AttachmentSetIdNotFound(e) => e.request_id(),
Self::AttachmentSetSizeLimitExceeded(e) => e.request_id(),
Self::CaseCreationLimitExceeded(e) => e.request_id(),
Self::CaseIdNotFound(e) => e.request_id(),
Self::DescribeAttachmentLimitExceeded(e) => e.request_id(),
Self::InternalServerError(e) => e.request_id(),
Self::ThrottlingException(e) => e.request_id(),
Self::Unhandled(e) => e.meta.request_id(),
}
}
}