#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum Error {
AlreadyStreamedException(crate::types::error::AlreadyStreamedException),
ConcurrentModificationException(crate::types::error::ConcurrentModificationException),
DuplicateRequestException(crate::types::error::DuplicateRequestException),
InternalErrorException(crate::types::error::InternalErrorException),
#[allow(missing_docs)] InvalidConfigurationException(crate::types::error::InvalidConfigurationException),
InvalidLambdaFunctionOutputException(crate::types::error::InvalidLambdaFunctionOutputException),
InvalidParameterException(crate::types::error::InvalidParameterException),
LambdaThrottledException(crate::types::error::LambdaThrottledException),
LimitExceededException(crate::types::error::LimitExceededException),
NotAuthorizedException(crate::types::error::NotAuthorizedException),
ResourceConflictException(crate::types::error::ResourceConflictException),
ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
TooManyRequestsException(crate::types::error::TooManyRequestsException),
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::AlreadyStreamedException(inner) => inner.fmt(f),
Error::ConcurrentModificationException(inner) => inner.fmt(f),
Error::DuplicateRequestException(inner) => inner.fmt(f),
Error::InternalErrorException(inner) => inner.fmt(f),
Error::InvalidConfigurationException(inner) => inner.fmt(f),
Error::InvalidLambdaFunctionOutputException(inner) => inner.fmt(f),
Error::InvalidParameterException(inner) => inner.fmt(f),
Error::LambdaThrottledException(inner) => inner.fmt(f),
Error::LimitExceededException(inner) => inner.fmt(f),
Error::NotAuthorizedException(inner) => inner.fmt(f),
Error::ResourceConflictException(inner) => inner.fmt(f),
Error::ResourceNotFoundException(inner) => inner.fmt(f),
Error::TooManyRequestsException(inner) => inner.fmt(f),
Error::Unhandled(inner) => inner.fmt(f),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::operation::bulk_publish::BulkPublishError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::operation::bulk_publish::BulkPublishError, 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::bulk_publish::BulkPublishError> for Error {
fn from(err: crate::operation::bulk_publish::BulkPublishError) -> Self {
match err {
crate::operation::bulk_publish::BulkPublishError::AlreadyStreamedException(inner) => {
Error::AlreadyStreamedException(inner)
}
crate::operation::bulk_publish::BulkPublishError::DuplicateRequestException(inner) => {
Error::DuplicateRequestException(inner)
}
crate::operation::bulk_publish::BulkPublishError::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::operation::bulk_publish::BulkPublishError::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::operation::bulk_publish::BulkPublishError::NotAuthorizedException(inner) => {
Error::NotAuthorizedException(inner)
}
crate::operation::bulk_publish::BulkPublishError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::bulk_publish::BulkPublishError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::operation::delete_dataset::DeleteDatasetError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::delete_dataset::DeleteDatasetError,
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::delete_dataset::DeleteDatasetError> for Error {
fn from(err: crate::operation::delete_dataset::DeleteDatasetError) -> Self {
match err {
crate::operation::delete_dataset::DeleteDatasetError::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::operation::delete_dataset::DeleteDatasetError::InvalidParameterException(
inner,
) => Error::InvalidParameterException(inner),
crate::operation::delete_dataset::DeleteDatasetError::NotAuthorizedException(inner) => {
Error::NotAuthorizedException(inner)
}
crate::operation::delete_dataset::DeleteDatasetError::ResourceConflictException(
inner,
) => Error::ResourceConflictException(inner),
crate::operation::delete_dataset::DeleteDatasetError::ResourceNotFoundException(
inner,
) => Error::ResourceNotFoundException(inner),
crate::operation::delete_dataset::DeleteDatasetError::TooManyRequestsException(
inner,
) => Error::TooManyRequestsException(inner),
crate::operation::delete_dataset::DeleteDatasetError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::describe_dataset::DescribeDatasetError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::describe_dataset::DescribeDatasetError,
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_dataset::DescribeDatasetError> for Error {
fn from(err: crate::operation::describe_dataset::DescribeDatasetError) -> Self {
match err {
crate::operation::describe_dataset::DescribeDatasetError::InternalErrorException(
inner,
) => Error::InternalErrorException(inner),
crate::operation::describe_dataset::DescribeDatasetError::InvalidParameterException(
inner,
) => Error::InvalidParameterException(inner),
crate::operation::describe_dataset::DescribeDatasetError::NotAuthorizedException(
inner,
) => Error::NotAuthorizedException(inner),
crate::operation::describe_dataset::DescribeDatasetError::ResourceNotFoundException(
inner,
) => Error::ResourceNotFoundException(inner),
crate::operation::describe_dataset::DescribeDatasetError::TooManyRequestsException(
inner,
) => Error::TooManyRequestsException(inner),
crate::operation::describe_dataset::DescribeDatasetError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::describe_identity_pool_usage::DescribeIdentityPoolUsageError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::describe_identity_pool_usage::DescribeIdentityPoolUsageError,
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_identity_pool_usage::DescribeIdentityPoolUsageError>
for Error
{
fn from(
err: crate::operation::describe_identity_pool_usage::DescribeIdentityPoolUsageError,
) -> Self {
match err {
crate::operation::describe_identity_pool_usage::DescribeIdentityPoolUsageError::InternalErrorException(inner) => Error::InternalErrorException(inner),
crate::operation::describe_identity_pool_usage::DescribeIdentityPoolUsageError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::describe_identity_pool_usage::DescribeIdentityPoolUsageError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
crate::operation::describe_identity_pool_usage::DescribeIdentityPoolUsageError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::describe_identity_pool_usage::DescribeIdentityPoolUsageError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::operation::describe_identity_pool_usage::DescribeIdentityPoolUsageError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::describe_identity_usage::DescribeIdentityUsageError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::describe_identity_usage::DescribeIdentityUsageError,
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_identity_usage::DescribeIdentityUsageError> for Error {
fn from(err: crate::operation::describe_identity_usage::DescribeIdentityUsageError) -> Self {
match err {
crate::operation::describe_identity_usage::DescribeIdentityUsageError::InternalErrorException(inner) => Error::InternalErrorException(inner),
crate::operation::describe_identity_usage::DescribeIdentityUsageError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::describe_identity_usage::DescribeIdentityUsageError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
crate::operation::describe_identity_usage::DescribeIdentityUsageError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::describe_identity_usage::DescribeIdentityUsageError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::operation::describe_identity_usage::DescribeIdentityUsageError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::get_bulk_publish_details::GetBulkPublishDetailsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::get_bulk_publish_details::GetBulkPublishDetailsError,
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_bulk_publish_details::GetBulkPublishDetailsError> for Error {
fn from(err: crate::operation::get_bulk_publish_details::GetBulkPublishDetailsError) -> Self {
match err {
crate::operation::get_bulk_publish_details::GetBulkPublishDetailsError::InternalErrorException(inner) => Error::InternalErrorException(inner),
crate::operation::get_bulk_publish_details::GetBulkPublishDetailsError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::get_bulk_publish_details::GetBulkPublishDetailsError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
crate::operation::get_bulk_publish_details::GetBulkPublishDetailsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_bulk_publish_details::GetBulkPublishDetailsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::get_cognito_events::GetCognitoEventsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::get_cognito_events::GetCognitoEventsError,
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_cognito_events::GetCognitoEventsError> for Error {
fn from(err: crate::operation::get_cognito_events::GetCognitoEventsError) -> Self {
match err {
crate::operation::get_cognito_events::GetCognitoEventsError::InternalErrorException(inner) => Error::InternalErrorException(inner),
crate::operation::get_cognito_events::GetCognitoEventsError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::get_cognito_events::GetCognitoEventsError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
crate::operation::get_cognito_events::GetCognitoEventsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_cognito_events::GetCognitoEventsError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::operation::get_cognito_events::GetCognitoEventsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::get_identity_pool_configuration::GetIdentityPoolConfigurationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::get_identity_pool_configuration::GetIdentityPoolConfigurationError,
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_identity_pool_configuration::GetIdentityPoolConfigurationError>
for Error
{
fn from(
err: crate::operation::get_identity_pool_configuration::GetIdentityPoolConfigurationError,
) -> Self {
match err {
crate::operation::get_identity_pool_configuration::GetIdentityPoolConfigurationError::InternalErrorException(inner) => Error::InternalErrorException(inner),
crate::operation::get_identity_pool_configuration::GetIdentityPoolConfigurationError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::get_identity_pool_configuration::GetIdentityPoolConfigurationError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
crate::operation::get_identity_pool_configuration::GetIdentityPoolConfigurationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_identity_pool_configuration::GetIdentityPoolConfigurationError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::operation::get_identity_pool_configuration::GetIdentityPoolConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::operation::list_datasets::ListDatasetsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::list_datasets::ListDatasetsError,
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_datasets::ListDatasetsError> for Error {
fn from(err: crate::operation::list_datasets::ListDatasetsError) -> Self {
match err {
crate::operation::list_datasets::ListDatasetsError::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::operation::list_datasets::ListDatasetsError::InvalidParameterException(
inner,
) => Error::InvalidParameterException(inner),
crate::operation::list_datasets::ListDatasetsError::NotAuthorizedException(inner) => {
Error::NotAuthorizedException(inner)
}
crate::operation::list_datasets::ListDatasetsError::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::operation::list_datasets::ListDatasetsError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::list_identity_pool_usage::ListIdentityPoolUsageError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::list_identity_pool_usage::ListIdentityPoolUsageError,
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_identity_pool_usage::ListIdentityPoolUsageError> for Error {
fn from(err: crate::operation::list_identity_pool_usage::ListIdentityPoolUsageError) -> Self {
match err {
crate::operation::list_identity_pool_usage::ListIdentityPoolUsageError::InternalErrorException(inner) => Error::InternalErrorException(inner),
crate::operation::list_identity_pool_usage::ListIdentityPoolUsageError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::list_identity_pool_usage::ListIdentityPoolUsageError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
crate::operation::list_identity_pool_usage::ListIdentityPoolUsageError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::operation::list_identity_pool_usage::ListIdentityPoolUsageError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::operation::list_records::ListRecordsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::operation::list_records::ListRecordsError, 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_records::ListRecordsError> for Error {
fn from(err: crate::operation::list_records::ListRecordsError) -> Self {
match err {
crate::operation::list_records::ListRecordsError::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::operation::list_records::ListRecordsError::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::operation::list_records::ListRecordsError::NotAuthorizedException(inner) => {
Error::NotAuthorizedException(inner)
}
crate::operation::list_records::ListRecordsError::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::operation::list_records::ListRecordsError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::register_device::RegisterDeviceError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::register_device::RegisterDeviceError,
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::register_device::RegisterDeviceError> for Error {
fn from(err: crate::operation::register_device::RegisterDeviceError) -> Self {
match err {
crate::operation::register_device::RegisterDeviceError::InternalErrorException(inner) => Error::InternalErrorException(inner),
crate::operation::register_device::RegisterDeviceError::InvalidConfigurationException(inner) => Error::InvalidConfigurationException(inner),
crate::operation::register_device::RegisterDeviceError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::register_device::RegisterDeviceError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
crate::operation::register_device::RegisterDeviceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::register_device::RegisterDeviceError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::operation::register_device::RegisterDeviceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::set_cognito_events::SetCognitoEventsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::set_cognito_events::SetCognitoEventsError,
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::set_cognito_events::SetCognitoEventsError> for Error {
fn from(err: crate::operation::set_cognito_events::SetCognitoEventsError) -> Self {
match err {
crate::operation::set_cognito_events::SetCognitoEventsError::InternalErrorException(inner) => Error::InternalErrorException(inner),
crate::operation::set_cognito_events::SetCognitoEventsError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::set_cognito_events::SetCognitoEventsError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
crate::operation::set_cognito_events::SetCognitoEventsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::set_cognito_events::SetCognitoEventsError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::operation::set_cognito_events::SetCognitoEventsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::set_identity_pool_configuration::SetIdentityPoolConfigurationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::set_identity_pool_configuration::SetIdentityPoolConfigurationError,
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::set_identity_pool_configuration::SetIdentityPoolConfigurationError>
for Error
{
fn from(
err: crate::operation::set_identity_pool_configuration::SetIdentityPoolConfigurationError,
) -> Self {
match err {
crate::operation::set_identity_pool_configuration::SetIdentityPoolConfigurationError::ConcurrentModificationException(inner) => Error::ConcurrentModificationException(inner),
crate::operation::set_identity_pool_configuration::SetIdentityPoolConfigurationError::InternalErrorException(inner) => Error::InternalErrorException(inner),
crate::operation::set_identity_pool_configuration::SetIdentityPoolConfigurationError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::set_identity_pool_configuration::SetIdentityPoolConfigurationError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
crate::operation::set_identity_pool_configuration::SetIdentityPoolConfigurationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::set_identity_pool_configuration::SetIdentityPoolConfigurationError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::operation::set_identity_pool_configuration::SetIdentityPoolConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::subscribe_to_dataset::SubscribeToDatasetError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::subscribe_to_dataset::SubscribeToDatasetError,
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::subscribe_to_dataset::SubscribeToDatasetError> for Error {
fn from(err: crate::operation::subscribe_to_dataset::SubscribeToDatasetError) -> Self {
match err {
crate::operation::subscribe_to_dataset::SubscribeToDatasetError::InternalErrorException(inner) => Error::InternalErrorException(inner),
crate::operation::subscribe_to_dataset::SubscribeToDatasetError::InvalidConfigurationException(inner) => Error::InvalidConfigurationException(inner),
crate::operation::subscribe_to_dataset::SubscribeToDatasetError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::subscribe_to_dataset::SubscribeToDatasetError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
crate::operation::subscribe_to_dataset::SubscribeToDatasetError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::subscribe_to_dataset::SubscribeToDatasetError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::operation::subscribe_to_dataset::SubscribeToDatasetError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::unsubscribe_from_dataset::UnsubscribeFromDatasetError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::unsubscribe_from_dataset::UnsubscribeFromDatasetError,
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::unsubscribe_from_dataset::UnsubscribeFromDatasetError> for Error {
fn from(err: crate::operation::unsubscribe_from_dataset::UnsubscribeFromDatasetError) -> Self {
match err {
crate::operation::unsubscribe_from_dataset::UnsubscribeFromDatasetError::InternalErrorException(inner) => Error::InternalErrorException(inner),
crate::operation::unsubscribe_from_dataset::UnsubscribeFromDatasetError::InvalidConfigurationException(inner) => Error::InvalidConfigurationException(inner),
crate::operation::unsubscribe_from_dataset::UnsubscribeFromDatasetError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::unsubscribe_from_dataset::UnsubscribeFromDatasetError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
crate::operation::unsubscribe_from_dataset::UnsubscribeFromDatasetError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::unsubscribe_from_dataset::UnsubscribeFromDatasetError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::operation::unsubscribe_from_dataset::UnsubscribeFromDatasetError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::operation::update_records::UpdateRecordsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::update_records::UpdateRecordsError,
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::update_records::UpdateRecordsError> for Error {
fn from(err: crate::operation::update_records::UpdateRecordsError) -> Self {
match err {
crate::operation::update_records::UpdateRecordsError::InternalErrorException(inner) => Error::InternalErrorException(inner),
crate::operation::update_records::UpdateRecordsError::InvalidLambdaFunctionOutputException(inner) => Error::InvalidLambdaFunctionOutputException(inner),
crate::operation::update_records::UpdateRecordsError::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::operation::update_records::UpdateRecordsError::LambdaThrottledException(inner) => Error::LambdaThrottledException(inner),
crate::operation::update_records::UpdateRecordsError::LimitExceededException(inner) => Error::LimitExceededException(inner),
crate::operation::update_records::UpdateRecordsError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
crate::operation::update_records::UpdateRecordsError::ResourceConflictException(inner) => Error::ResourceConflictException(inner),
crate::operation::update_records::UpdateRecordsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::update_records::UpdateRecordsError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::operation::update_records::UpdateRecordsError::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::AlreadyStreamedException(inner) => inner.source(),
Error::ConcurrentModificationException(inner) => inner.source(),
Error::DuplicateRequestException(inner) => inner.source(),
Error::InternalErrorException(inner) => inner.source(),
Error::InvalidConfigurationException(inner) => inner.source(),
Error::InvalidLambdaFunctionOutputException(inner) => inner.source(),
Error::InvalidParameterException(inner) => inner.source(),
Error::LambdaThrottledException(inner) => inner.source(),
Error::LimitExceededException(inner) => inner.source(),
Error::NotAuthorizedException(inner) => inner.source(),
Error::ResourceConflictException(inner) => inner.source(),
Error::ResourceNotFoundException(inner) => inner.source(),
Error::TooManyRequestsException(inner) => inner.source(),
Error::Unhandled(inner) => inner.source(),
}
}
}
impl aws_http::request_id::RequestId for Error {
fn request_id(&self) -> Option<&str> {
match self {
Self::AlreadyStreamedException(e) => e.request_id(),
Self::ConcurrentModificationException(e) => e.request_id(),
Self::DuplicateRequestException(e) => e.request_id(),
Self::InternalErrorException(e) => e.request_id(),
Self::InvalidConfigurationException(e) => e.request_id(),
Self::InvalidLambdaFunctionOutputException(e) => e.request_id(),
Self::InvalidParameterException(e) => e.request_id(),
Self::LambdaThrottledException(e) => e.request_id(),
Self::LimitExceededException(e) => e.request_id(),
Self::NotAuthorizedException(e) => e.request_id(),
Self::ResourceConflictException(e) => e.request_id(),
Self::ResourceNotFoundException(e) => e.request_id(),
Self::TooManyRequestsException(e) => e.request_id(),
Self::Unhandled(e) => e.request_id(),
}
}
}