#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum Error {
AccessDeniedException(crate::types::error::AccessDeniedException),
ConcurrentLimitExceededException(crate::types::error::ConcurrentLimitExceededException),
ConflictException(crate::types::error::ConflictException),
InternalServerException(crate::types::error::InternalServerException),
RequestThrottledException(crate::types::error::RequestThrottledException),
ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
ValidationException(crate::types::error::ValidationException),
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::AccessDeniedException(inner) => inner.fmt(f),
Error::ConcurrentLimitExceededException(inner) => inner.fmt(f),
Error::ConflictException(inner) => inner.fmt(f),
Error::InternalServerException(inner) => inner.fmt(f),
Error::RequestThrottledException(inner) => inner.fmt(f),
Error::ResourceNotFoundException(inner) => inner.fmt(f),
Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
Error::ValidationException(inner) => inner.fmt(f),
Error::Unhandled(inner) => inner.fmt(f),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::complete_snapshot::CompleteSnapshotError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::complete_snapshot::CompleteSnapshotError,
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::complete_snapshot::CompleteSnapshotError> for Error {
fn from(err: crate::operation::complete_snapshot::CompleteSnapshotError) -> Self {
match err {
crate::operation::complete_snapshot::CompleteSnapshotError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::complete_snapshot::CompleteSnapshotError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::complete_snapshot::CompleteSnapshotError::RequestThrottledException(inner) => Error::RequestThrottledException(inner),
crate::operation::complete_snapshot::CompleteSnapshotError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::complete_snapshot::CompleteSnapshotError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
crate::operation::complete_snapshot::CompleteSnapshotError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::complete_snapshot::CompleteSnapshotError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::get_snapshot_block::GetSnapshotBlockError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::get_snapshot_block::GetSnapshotBlockError,
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::get_snapshot_block::GetSnapshotBlockError> for Error {
fn from(err: crate::operation::get_snapshot_block::GetSnapshotBlockError) -> Self {
match err {
crate::operation::get_snapshot_block::GetSnapshotBlockError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_snapshot_block::GetSnapshotBlockError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_snapshot_block::GetSnapshotBlockError::RequestThrottledException(inner) => Error::RequestThrottledException(inner),
crate::operation::get_snapshot_block::GetSnapshotBlockError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_snapshot_block::GetSnapshotBlockError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
crate::operation::get_snapshot_block::GetSnapshotBlockError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_snapshot_block::GetSnapshotBlockError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::list_changed_blocks::ListChangedBlocksError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::list_changed_blocks::ListChangedBlocksError,
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::list_changed_blocks::ListChangedBlocksError> for Error {
fn from(err: crate::operation::list_changed_blocks::ListChangedBlocksError) -> Self {
match err {
crate::operation::list_changed_blocks::ListChangedBlocksError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_changed_blocks::ListChangedBlocksError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_changed_blocks::ListChangedBlocksError::RequestThrottledException(inner) => Error::RequestThrottledException(inner),
crate::operation::list_changed_blocks::ListChangedBlocksError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::list_changed_blocks::ListChangedBlocksError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
crate::operation::list_changed_blocks::ListChangedBlocksError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_changed_blocks::ListChangedBlocksError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::list_snapshot_blocks::ListSnapshotBlocksError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::list_snapshot_blocks::ListSnapshotBlocksError,
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::list_snapshot_blocks::ListSnapshotBlocksError> for Error {
fn from(err: crate::operation::list_snapshot_blocks::ListSnapshotBlocksError) -> Self {
match err {
crate::operation::list_snapshot_blocks::ListSnapshotBlocksError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_snapshot_blocks::ListSnapshotBlocksError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_snapshot_blocks::ListSnapshotBlocksError::RequestThrottledException(inner) => Error::RequestThrottledException(inner),
crate::operation::list_snapshot_blocks::ListSnapshotBlocksError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::list_snapshot_blocks::ListSnapshotBlocksError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
crate::operation::list_snapshot_blocks::ListSnapshotBlocksError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_snapshot_blocks::ListSnapshotBlocksError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::put_snapshot_block::PutSnapshotBlockError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::put_snapshot_block::PutSnapshotBlockError,
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::put_snapshot_block::PutSnapshotBlockError> for Error {
fn from(err: crate::operation::put_snapshot_block::PutSnapshotBlockError) -> Self {
match err {
crate::operation::put_snapshot_block::PutSnapshotBlockError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::put_snapshot_block::PutSnapshotBlockError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::put_snapshot_block::PutSnapshotBlockError::RequestThrottledException(inner) => Error::RequestThrottledException(inner),
crate::operation::put_snapshot_block::PutSnapshotBlockError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::put_snapshot_block::PutSnapshotBlockError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
crate::operation::put_snapshot_block::PutSnapshotBlockError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::put_snapshot_block::PutSnapshotBlockError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::operation::start_snapshot::StartSnapshotError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::start_snapshot::StartSnapshotError,
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::start_snapshot::StartSnapshotError> for Error {
fn from(err: crate::operation::start_snapshot::StartSnapshotError) -> Self {
match err {
crate::operation::start_snapshot::StartSnapshotError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::start_snapshot::StartSnapshotError::ConcurrentLimitExceededException(inner) => Error::ConcurrentLimitExceededException(inner),
crate::operation::start_snapshot::StartSnapshotError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::start_snapshot::StartSnapshotError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::start_snapshot::StartSnapshotError::RequestThrottledException(inner) => Error::RequestThrottledException(inner),
crate::operation::start_snapshot::StartSnapshotError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::start_snapshot::StartSnapshotError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
crate::operation::start_snapshot::StartSnapshotError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::start_snapshot::StartSnapshotError::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::AccessDeniedException(e) => e.request_id(),
Self::ConcurrentLimitExceededException(e) => e.request_id(),
Self::ConflictException(e) => e.request_id(),
Self::InternalServerException(e) => e.request_id(),
Self::RequestThrottledException(e) => e.request_id(),
Self::ResourceNotFoundException(e) => e.request_id(),
Self::ServiceQuotaExceededException(e) => e.request_id(),
Self::ValidationException(e) => e.request_id(),
Self::Unhandled(e) => e.request_id(),
}
}
}