#[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),
Unhandled(aws_smithy_types::error::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::Unhandled(inner) => inner.fmt(f),
}
}
}
impl<R>
From<
aws_smithy_http::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_http::result::SdkError<
crate::operation::add_attachments_to_set::AddAttachmentsToSetError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(
aws_smithy_types::error::Unhandled::builder()
.meta(
aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
)
.source(err)
.build(),
),
}
}
}
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_http::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_http::result::SdkError<
crate::operation::add_communication_to_case::AddCommunicationToCaseError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(
aws_smithy_types::error::Unhandled::builder()
.meta(
aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
)
.source(err)
.build(),
),
}
}
}
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_http::result::SdkError<crate::operation::create_case::CreateCaseError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::operation::create_case::CreateCaseError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(
aws_smithy_types::error::Unhandled::builder()
.meta(
aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
)
.source(err)
.build(),
),
}
}
}
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_http::result::SdkError<
crate::operation::describe_attachment::DescribeAttachmentError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::describe_attachment::DescribeAttachmentError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(
aws_smithy_types::error::Unhandled::builder()
.meta(
aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
)
.source(err)
.build(),
),
}
}
}
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_http::result::SdkError<crate::operation::describe_cases::DescribeCasesError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::describe_cases::DescribeCasesError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(
aws_smithy_types::error::Unhandled::builder()
.meta(
aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
)
.source(err)
.build(),
),
}
}
}
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_http::result::SdkError<
crate::operation::describe_communications::DescribeCommunicationsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::describe_communications::DescribeCommunicationsError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(
aws_smithy_types::error::Unhandled::builder()
.meta(
aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
)
.source(err)
.build(),
),
}
}
}
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_http::result::SdkError<
crate::operation::describe_services::DescribeServicesError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::describe_services::DescribeServicesError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(
aws_smithy_types::error::Unhandled::builder()
.meta(
aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
)
.source(err)
.build(),
),
}
}
}
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_http::result::SdkError<
crate::operation::describe_severity_levels::DescribeSeverityLevelsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::describe_severity_levels::DescribeSeverityLevelsError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(
aws_smithy_types::error::Unhandled::builder()
.meta(
aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
)
.source(err)
.build(),
),
}
}
}
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_http::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_http::result::SdkError<crate::operation::describe_trusted_advisor_check_refresh_statuses::DescribeTrustedAdvisorCheckRefreshStatusesError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
aws_smithy_types::error::Unhandled::builder()
.meta(aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build()
),
}
}
}
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::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<aws_smithy_http::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_http::result::SdkError<crate::operation::describe_trusted_advisor_check_result::DescribeTrustedAdvisorCheckResultError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
aws_smithy_types::error::Unhandled::builder()
.meta(aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build()
),
}
}
}
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::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::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_http::result::SdkError<
crate::operation::describe_trusted_advisor_checks::DescribeTrustedAdvisorChecksError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(
aws_smithy_types::error::Unhandled::builder()
.meta(
aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
)
.source(err)
.build(),
),
}
}
}
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::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<aws_smithy_http::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_http::result::SdkError<crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
aws_smithy_types::error::Unhandled::builder()
.meta(aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build()
),
}
}
}
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::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::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_http::result::SdkError<
crate::operation::refresh_trusted_advisor_check::RefreshTrustedAdvisorCheckError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(
aws_smithy_types::error::Unhandled::builder()
.meta(
aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
)
.source(err)
.build(),
),
}
}
}
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_http::result::SdkError<crate::operation::resolve_case::ResolveCaseError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::operation::resolve_case::ResolveCaseError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(
aws_smithy_types::error::Unhandled::builder()
.meta(
aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
)
.source(err)
.build(),
),
}
}
}
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 {}
impl aws_http::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::Unhandled(e) => e.request_id(),
}
}
}