#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum Error {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidRequestException(crate::error::InvalidRequestException),
InvalidStateException(crate::error::InvalidStateException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::InternalServiceErrorException(inner) => inner.fmt(f),
Error::InvalidRequestException(inner) => inner.fmt(f),
Error::InvalidStateException(inner) => inner.fmt(f),
Error::ResourceNotFoundException(inner) => inner.fmt(f),
Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
Error::Unhandled(inner) => inner.fmt(f),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::AssociateCustomDomainError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::AssociateCustomDomainError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::AssociateCustomDomainErrorKind::InternalServiceErrorException(
inner,
) => Error::InternalServiceErrorException(inner),
crate::error::AssociateCustomDomainErrorKind::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::error::AssociateCustomDomainErrorKind::InvalidStateException(inner) => {
Error::InvalidStateException(inner)
}
crate::error::AssociateCustomDomainErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::error::CreateAutoScalingConfigurationError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::CreateAutoScalingConfigurationError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, ..} => match err.kind {
crate::error::CreateAutoScalingConfigurationErrorKind::InternalServiceErrorException(inner) => Error::InternalServiceErrorException(inner),
crate::error::CreateAutoScalingConfigurationErrorKind::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
crate::error::CreateAutoScalingConfigurationErrorKind::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
crate::error::CreateAutoScalingConfigurationErrorKind::Unhandled(inner) => Error::Unhandled(inner),
}
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateConnectionError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CreateConnectionError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::CreateConnectionErrorKind::InternalServiceErrorException(inner) => {
Error::InternalServiceErrorException(inner)
}
crate::error::CreateConnectionErrorKind::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::error::CreateConnectionErrorKind::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::error::CreateConnectionErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateServiceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::CreateServiceError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::CreateServiceErrorKind::InternalServiceErrorException(inner) => {
Error::InternalServiceErrorException(inner)
}
crate::error::CreateServiceErrorKind::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::error::CreateServiceErrorKind::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::error::CreateServiceErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::error::DeleteAutoScalingConfigurationError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::DeleteAutoScalingConfigurationError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, ..} => match err.kind {
crate::error::DeleteAutoScalingConfigurationErrorKind::InternalServiceErrorException(inner) => Error::InternalServiceErrorException(inner),
crate::error::DeleteAutoScalingConfigurationErrorKind::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
crate::error::DeleteAutoScalingConfigurationErrorKind::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::error::DeleteAutoScalingConfigurationErrorKind::Unhandled(inner) => Error::Unhandled(inner),
}
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteConnectionError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DeleteConnectionError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::DeleteConnectionErrorKind::InternalServiceErrorException(inner) => {
Error::InternalServiceErrorException(inner)
}
crate::error::DeleteConnectionErrorKind::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::error::DeleteConnectionErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DeleteConnectionErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteServiceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::DeleteServiceError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::DeleteServiceErrorKind::InternalServiceErrorException(inner) => {
Error::InternalServiceErrorException(inner)
}
crate::error::DeleteServiceErrorKind::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::error::DeleteServiceErrorKind::InvalidStateException(inner) => {
Error::InvalidStateException(inner)
}
crate::error::DeleteServiceErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DeleteServiceErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::error::DescribeAutoScalingConfigurationError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::DescribeAutoScalingConfigurationError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, ..} => match err.kind {
crate::error::DescribeAutoScalingConfigurationErrorKind::InternalServiceErrorException(inner) => Error::InternalServiceErrorException(inner),
crate::error::DescribeAutoScalingConfigurationErrorKind::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
crate::error::DescribeAutoScalingConfigurationErrorKind::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::error::DescribeAutoScalingConfigurationErrorKind::Unhandled(inner) => Error::Unhandled(inner),
}
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeCustomDomainsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeCustomDomainsError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::DescribeCustomDomainsErrorKind::InternalServiceErrorException(
inner,
) => Error::InternalServiceErrorException(inner),
crate::error::DescribeCustomDomainsErrorKind::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::error::DescribeCustomDomainsErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DescribeCustomDomainsErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeServiceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::DescribeServiceError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::DescribeServiceErrorKind::InternalServiceErrorException(inner) => {
Error::InternalServiceErrorException(inner)
}
crate::error::DescribeServiceErrorKind::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::error::DescribeServiceErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DescribeServiceErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DisassociateCustomDomainError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DisassociateCustomDomainError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::DisassociateCustomDomainErrorKind::InternalServiceErrorException(
inner,
) => Error::InternalServiceErrorException(inner),
crate::error::DisassociateCustomDomainErrorKind::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::error::DisassociateCustomDomainErrorKind::InvalidStateException(inner) => {
Error::InvalidStateException(inner)
}
crate::error::DisassociateCustomDomainErrorKind::ResourceNotFoundException(
inner,
) => Error::ResourceNotFoundException(inner),
crate::error::DisassociateCustomDomainErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListAutoScalingConfigurationsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::ListAutoScalingConfigurationsError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, ..} => match err.kind {
crate::error::ListAutoScalingConfigurationsErrorKind::InternalServiceErrorException(inner) => Error::InternalServiceErrorException(inner),
crate::error::ListAutoScalingConfigurationsErrorKind::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
crate::error::ListAutoScalingConfigurationsErrorKind::Unhandled(inner) => Error::Unhandled(inner),
}
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListConnectionsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::ListConnectionsError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::ListConnectionsErrorKind::InternalServiceErrorException(inner) => {
Error::InternalServiceErrorException(inner)
}
crate::error::ListConnectionsErrorKind::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::error::ListConnectionsErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListOperationsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::ListOperationsError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::ListOperationsErrorKind::InternalServiceErrorException(inner) => {
Error::InternalServiceErrorException(inner)
}
crate::error::ListOperationsErrorKind::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::error::ListOperationsErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::ListOperationsErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListServicesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::ListServicesError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::ListServicesErrorKind::InternalServiceErrorException(inner) => {
Error::InternalServiceErrorException(inner)
}
crate::error::ListServicesErrorKind::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::error::ListServicesErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListTagsForResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::ListTagsForResourceError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::ListTagsForResourceErrorKind::InternalServiceErrorException(
inner,
) => Error::InternalServiceErrorException(inner),
crate::error::ListTagsForResourceErrorKind::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::error::ListTagsForResourceErrorKind::InvalidStateException(inner) => {
Error::InvalidStateException(inner)
}
crate::error::ListTagsForResourceErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::ListTagsForResourceErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::PauseServiceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::PauseServiceError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::PauseServiceErrorKind::InternalServiceErrorException(inner) => {
Error::InternalServiceErrorException(inner)
}
crate::error::PauseServiceErrorKind::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::error::PauseServiceErrorKind::InvalidStateException(inner) => {
Error::InvalidStateException(inner)
}
crate::error::PauseServiceErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::PauseServiceErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ResumeServiceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::ResumeServiceError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::ResumeServiceErrorKind::InternalServiceErrorException(inner) => {
Error::InternalServiceErrorException(inner)
}
crate::error::ResumeServiceErrorKind::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::error::ResumeServiceErrorKind::InvalidStateException(inner) => {
Error::InvalidStateException(inner)
}
crate::error::ResumeServiceErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::ResumeServiceErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::StartDeploymentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::StartDeploymentError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::StartDeploymentErrorKind::InternalServiceErrorException(inner) => {
Error::InternalServiceErrorException(inner)
}
crate::error::StartDeploymentErrorKind::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::error::StartDeploymentErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::StartDeploymentErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::TagResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::TagResourceError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::TagResourceErrorKind::InternalServiceErrorException(inner) => {
Error::InternalServiceErrorException(inner)
}
crate::error::TagResourceErrorKind::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::error::TagResourceErrorKind::InvalidStateException(inner) => {
Error::InvalidStateException(inner)
}
crate::error::TagResourceErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::TagResourceErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UntagResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::UntagResourceError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::UntagResourceErrorKind::InternalServiceErrorException(inner) => {
Error::InternalServiceErrorException(inner)
}
crate::error::UntagResourceErrorKind::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::error::UntagResourceErrorKind::InvalidStateException(inner) => {
Error::InvalidStateException(inner)
}
crate::error::UntagResourceErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::UntagResourceErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UpdateServiceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::UpdateServiceError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::UpdateServiceErrorKind::InternalServiceErrorException(inner) => {
Error::InternalServiceErrorException(inner)
}
crate::error::UpdateServiceErrorKind::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::error::UpdateServiceErrorKind::InvalidStateException(inner) => {
Error::InvalidStateException(inner)
}
crate::error::UpdateServiceErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::UpdateServiceErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl std::error::Error for Error {}