#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum Error {
ForbiddenException(crate::types::error::ForbiddenException),
InternalServerErrorException(crate::types::error::InternalServerErrorException),
NotFoundException(crate::types::error::NotFoundException),
ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
TooManyRequestsException(crate::types::error::TooManyRequestsException),
UnprocessableEntityException(crate::types::error::UnprocessableEntityException),
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::ForbiddenException(inner) => inner.fmt(f),
Error::InternalServerErrorException(inner) => inner.fmt(f),
Error::NotFoundException(inner) => inner.fmt(f),
Error::ServiceUnavailableException(inner) => inner.fmt(f),
Error::TooManyRequestsException(inner) => inner.fmt(f),
Error::UnprocessableEntityException(inner) => inner.fmt(f),
Error::Unhandled(inner) => inner.fmt(f),
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::operation::configure_logs::ConfigureLogsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::configure_logs::ConfigureLogsError,
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::configure_logs::ConfigureLogsError> for Error {
fn from(err: crate::operation::configure_logs::ConfigureLogsError) -> Self {
match err {
crate::operation::configure_logs::ConfigureLogsError::ForbiddenException(inner) => {
Error::ForbiddenException(inner)
}
crate::operation::configure_logs::ConfigureLogsError::InternalServerErrorException(
inner,
) => Error::InternalServerErrorException(inner),
crate::operation::configure_logs::ConfigureLogsError::NotFoundException(inner) => {
Error::NotFoundException(inner)
}
crate::operation::configure_logs::ConfigureLogsError::ServiceUnavailableException(
inner,
) => Error::ServiceUnavailableException(inner),
crate::operation::configure_logs::ConfigureLogsError::TooManyRequestsException(
inner,
) => Error::TooManyRequestsException(inner),
crate::operation::configure_logs::ConfigureLogsError::UnprocessableEntityException(
inner,
) => Error::UnprocessableEntityException(inner),
crate::operation::configure_logs::ConfigureLogsError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::operation::create_channel::CreateChannelError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::create_channel::CreateChannelError,
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_channel::CreateChannelError> for Error {
fn from(err: crate::operation::create_channel::CreateChannelError) -> Self {
match err {
crate::operation::create_channel::CreateChannelError::ForbiddenException(inner) => {
Error::ForbiddenException(inner)
}
crate::operation::create_channel::CreateChannelError::InternalServerErrorException(
inner,
) => Error::InternalServerErrorException(inner),
crate::operation::create_channel::CreateChannelError::NotFoundException(inner) => {
Error::NotFoundException(inner)
}
crate::operation::create_channel::CreateChannelError::ServiceUnavailableException(
inner,
) => Error::ServiceUnavailableException(inner),
crate::operation::create_channel::CreateChannelError::TooManyRequestsException(
inner,
) => Error::TooManyRequestsException(inner),
crate::operation::create_channel::CreateChannelError::UnprocessableEntityException(
inner,
) => Error::UnprocessableEntityException(inner),
crate::operation::create_channel::CreateChannelError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::create_harvest_job::CreateHarvestJobError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::create_harvest_job::CreateHarvestJobError,
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_harvest_job::CreateHarvestJobError> for Error {
fn from(err: crate::operation::create_harvest_job::CreateHarvestJobError) -> Self {
match err {
crate::operation::create_harvest_job::CreateHarvestJobError::ForbiddenException(inner) => Error::ForbiddenException(inner),
crate::operation::create_harvest_job::CreateHarvestJobError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
crate::operation::create_harvest_job::CreateHarvestJobError::NotFoundException(inner) => Error::NotFoundException(inner),
crate::operation::create_harvest_job::CreateHarvestJobError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
crate::operation::create_harvest_job::CreateHarvestJobError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::operation::create_harvest_job::CreateHarvestJobError::UnprocessableEntityException(inner) => Error::UnprocessableEntityException(inner),
crate::operation::create_harvest_job::CreateHarvestJobError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::create_origin_endpoint::CreateOriginEndpointError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::create_origin_endpoint::CreateOriginEndpointError,
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_origin_endpoint::CreateOriginEndpointError> for Error {
fn from(err: crate::operation::create_origin_endpoint::CreateOriginEndpointError) -> Self {
match err {
crate::operation::create_origin_endpoint::CreateOriginEndpointError::ForbiddenException(inner) => Error::ForbiddenException(inner),
crate::operation::create_origin_endpoint::CreateOriginEndpointError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
crate::operation::create_origin_endpoint::CreateOriginEndpointError::NotFoundException(inner) => Error::NotFoundException(inner),
crate::operation::create_origin_endpoint::CreateOriginEndpointError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
crate::operation::create_origin_endpoint::CreateOriginEndpointError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::operation::create_origin_endpoint::CreateOriginEndpointError::UnprocessableEntityException(inner) => Error::UnprocessableEntityException(inner),
crate::operation::create_origin_endpoint::CreateOriginEndpointError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::operation::delete_channel::DeleteChannelError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::delete_channel::DeleteChannelError,
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_channel::DeleteChannelError> for Error {
fn from(err: crate::operation::delete_channel::DeleteChannelError) -> Self {
match err {
crate::operation::delete_channel::DeleteChannelError::ForbiddenException(inner) => {
Error::ForbiddenException(inner)
}
crate::operation::delete_channel::DeleteChannelError::InternalServerErrorException(
inner,
) => Error::InternalServerErrorException(inner),
crate::operation::delete_channel::DeleteChannelError::NotFoundException(inner) => {
Error::NotFoundException(inner)
}
crate::operation::delete_channel::DeleteChannelError::ServiceUnavailableException(
inner,
) => Error::ServiceUnavailableException(inner),
crate::operation::delete_channel::DeleteChannelError::TooManyRequestsException(
inner,
) => Error::TooManyRequestsException(inner),
crate::operation::delete_channel::DeleteChannelError::UnprocessableEntityException(
inner,
) => Error::UnprocessableEntityException(inner),
crate::operation::delete_channel::DeleteChannelError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::delete_origin_endpoint::DeleteOriginEndpointError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::delete_origin_endpoint::DeleteOriginEndpointError,
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_origin_endpoint::DeleteOriginEndpointError> for Error {
fn from(err: crate::operation::delete_origin_endpoint::DeleteOriginEndpointError) -> Self {
match err {
crate::operation::delete_origin_endpoint::DeleteOriginEndpointError::ForbiddenException(inner) => Error::ForbiddenException(inner),
crate::operation::delete_origin_endpoint::DeleteOriginEndpointError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
crate::operation::delete_origin_endpoint::DeleteOriginEndpointError::NotFoundException(inner) => Error::NotFoundException(inner),
crate::operation::delete_origin_endpoint::DeleteOriginEndpointError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
crate::operation::delete_origin_endpoint::DeleteOriginEndpointError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::operation::delete_origin_endpoint::DeleteOriginEndpointError::UnprocessableEntityException(inner) => Error::UnprocessableEntityException(inner),
crate::operation::delete_origin_endpoint::DeleteOriginEndpointError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::describe_channel::DescribeChannelError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::describe_channel::DescribeChannelError,
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_channel::DescribeChannelError> for Error {
fn from(err: crate::operation::describe_channel::DescribeChannelError) -> Self {
match err {
crate::operation::describe_channel::DescribeChannelError::ForbiddenException(inner) => Error::ForbiddenException(inner),
crate::operation::describe_channel::DescribeChannelError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
crate::operation::describe_channel::DescribeChannelError::NotFoundException(inner) => Error::NotFoundException(inner),
crate::operation::describe_channel::DescribeChannelError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
crate::operation::describe_channel::DescribeChannelError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::operation::describe_channel::DescribeChannelError::UnprocessableEntityException(inner) => Error::UnprocessableEntityException(inner),
crate::operation::describe_channel::DescribeChannelError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::describe_harvest_job::DescribeHarvestJobError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::describe_harvest_job::DescribeHarvestJobError,
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_harvest_job::DescribeHarvestJobError> for Error {
fn from(err: crate::operation::describe_harvest_job::DescribeHarvestJobError) -> Self {
match err {
crate::operation::describe_harvest_job::DescribeHarvestJobError::ForbiddenException(inner) => Error::ForbiddenException(inner),
crate::operation::describe_harvest_job::DescribeHarvestJobError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
crate::operation::describe_harvest_job::DescribeHarvestJobError::NotFoundException(inner) => Error::NotFoundException(inner),
crate::operation::describe_harvest_job::DescribeHarvestJobError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
crate::operation::describe_harvest_job::DescribeHarvestJobError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::operation::describe_harvest_job::DescribeHarvestJobError::UnprocessableEntityException(inner) => Error::UnprocessableEntityException(inner),
crate::operation::describe_harvest_job::DescribeHarvestJobError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::describe_origin_endpoint::DescribeOriginEndpointError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::describe_origin_endpoint::DescribeOriginEndpointError,
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_origin_endpoint::DescribeOriginEndpointError> for Error {
fn from(err: crate::operation::describe_origin_endpoint::DescribeOriginEndpointError) -> Self {
match err {
crate::operation::describe_origin_endpoint::DescribeOriginEndpointError::ForbiddenException(inner) => Error::ForbiddenException(inner),
crate::operation::describe_origin_endpoint::DescribeOriginEndpointError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
crate::operation::describe_origin_endpoint::DescribeOriginEndpointError::NotFoundException(inner) => Error::NotFoundException(inner),
crate::operation::describe_origin_endpoint::DescribeOriginEndpointError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
crate::operation::describe_origin_endpoint::DescribeOriginEndpointError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::operation::describe_origin_endpoint::DescribeOriginEndpointError::UnprocessableEntityException(inner) => Error::UnprocessableEntityException(inner),
crate::operation::describe_origin_endpoint::DescribeOriginEndpointError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::operation::list_channels::ListChannelsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::list_channels::ListChannelsError,
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_channels::ListChannelsError> for Error {
fn from(err: crate::operation::list_channels::ListChannelsError) -> Self {
match err {
crate::operation::list_channels::ListChannelsError::ForbiddenException(inner) => {
Error::ForbiddenException(inner)
}
crate::operation::list_channels::ListChannelsError::InternalServerErrorException(
inner,
) => Error::InternalServerErrorException(inner),
crate::operation::list_channels::ListChannelsError::NotFoundException(inner) => {
Error::NotFoundException(inner)
}
crate::operation::list_channels::ListChannelsError::ServiceUnavailableException(
inner,
) => Error::ServiceUnavailableException(inner),
crate::operation::list_channels::ListChannelsError::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::operation::list_channels::ListChannelsError::UnprocessableEntityException(
inner,
) => Error::UnprocessableEntityException(inner),
crate::operation::list_channels::ListChannelsError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::list_harvest_jobs::ListHarvestJobsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::list_harvest_jobs::ListHarvestJobsError,
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_harvest_jobs::ListHarvestJobsError> for Error {
fn from(err: crate::operation::list_harvest_jobs::ListHarvestJobsError) -> Self {
match err {
crate::operation::list_harvest_jobs::ListHarvestJobsError::ForbiddenException(inner) => Error::ForbiddenException(inner),
crate::operation::list_harvest_jobs::ListHarvestJobsError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
crate::operation::list_harvest_jobs::ListHarvestJobsError::NotFoundException(inner) => Error::NotFoundException(inner),
crate::operation::list_harvest_jobs::ListHarvestJobsError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
crate::operation::list_harvest_jobs::ListHarvestJobsError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::operation::list_harvest_jobs::ListHarvestJobsError::UnprocessableEntityException(inner) => Error::UnprocessableEntityException(inner),
crate::operation::list_harvest_jobs::ListHarvestJobsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::list_origin_endpoints::ListOriginEndpointsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::list_origin_endpoints::ListOriginEndpointsError,
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_origin_endpoints::ListOriginEndpointsError> for Error {
fn from(err: crate::operation::list_origin_endpoints::ListOriginEndpointsError) -> Self {
match err {
crate::operation::list_origin_endpoints::ListOriginEndpointsError::ForbiddenException(inner) => Error::ForbiddenException(inner),
crate::operation::list_origin_endpoints::ListOriginEndpointsError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
crate::operation::list_origin_endpoints::ListOriginEndpointsError::NotFoundException(inner) => Error::NotFoundException(inner),
crate::operation::list_origin_endpoints::ListOriginEndpointsError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
crate::operation::list_origin_endpoints::ListOriginEndpointsError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::operation::list_origin_endpoints::ListOriginEndpointsError::UnprocessableEntityException(inner) => Error::UnprocessableEntityException(inner),
crate::operation::list_origin_endpoints::ListOriginEndpointsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::list_tags_for_resource::ListTagsForResourceError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::list_tags_for_resource::ListTagsForResourceError,
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_tags_for_resource::ListTagsForResourceError> for Error {
fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
match err {
crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(
inner,
) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::rotate_channel_credentials::RotateChannelCredentialsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::rotate_channel_credentials::RotateChannelCredentialsError,
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::rotate_channel_credentials::RotateChannelCredentialsError> for Error {
fn from(
err: crate::operation::rotate_channel_credentials::RotateChannelCredentialsError,
) -> Self {
match err {
crate::operation::rotate_channel_credentials::RotateChannelCredentialsError::ForbiddenException(inner) => Error::ForbiddenException(inner),
crate::operation::rotate_channel_credentials::RotateChannelCredentialsError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
crate::operation::rotate_channel_credentials::RotateChannelCredentialsError::NotFoundException(inner) => Error::NotFoundException(inner),
crate::operation::rotate_channel_credentials::RotateChannelCredentialsError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
crate::operation::rotate_channel_credentials::RotateChannelCredentialsError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::operation::rotate_channel_credentials::RotateChannelCredentialsError::UnprocessableEntityException(inner) => Error::UnprocessableEntityException(inner),
crate::operation::rotate_channel_credentials::RotateChannelCredentialsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::operation::rotate_ingest_endpoint_credentials::RotateIngestEndpointCredentialsError, R>> for Error where R: Send + Sync + std::fmt::Debug + 'static {
fn from(err: aws_smithy_http::result::SdkError<crate::operation::rotate_ingest_endpoint_credentials::RotateIngestEndpointCredentialsError, 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::rotate_ingest_endpoint_credentials::RotateIngestEndpointCredentialsError>
for Error
{
fn from(
err: crate::operation::rotate_ingest_endpoint_credentials::RotateIngestEndpointCredentialsError,
) -> Self {
match err {
crate::operation::rotate_ingest_endpoint_credentials::RotateIngestEndpointCredentialsError::ForbiddenException(inner) => Error::ForbiddenException(inner),
crate::operation::rotate_ingest_endpoint_credentials::RotateIngestEndpointCredentialsError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
crate::operation::rotate_ingest_endpoint_credentials::RotateIngestEndpointCredentialsError::NotFoundException(inner) => Error::NotFoundException(inner),
crate::operation::rotate_ingest_endpoint_credentials::RotateIngestEndpointCredentialsError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
crate::operation::rotate_ingest_endpoint_credentials::RotateIngestEndpointCredentialsError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::operation::rotate_ingest_endpoint_credentials::RotateIngestEndpointCredentialsError::UnprocessableEntityException(inner) => Error::UnprocessableEntityException(inner),
crate::operation::rotate_ingest_endpoint_credentials::RotateIngestEndpointCredentialsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::operation::tag_resource::TagResourceError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::operation::tag_resource::TagResourceError, 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::tag_resource::TagResourceError> for Error {
fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
match err {
crate::operation::tag_resource::TagResourceError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::untag_resource::UntagResourceError,
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::untag_resource::UntagResourceError> for Error {
fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
match err {
crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::operation::update_channel::UpdateChannelError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::update_channel::UpdateChannelError,
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_channel::UpdateChannelError> for Error {
fn from(err: crate::operation::update_channel::UpdateChannelError) -> Self {
match err {
crate::operation::update_channel::UpdateChannelError::ForbiddenException(inner) => {
Error::ForbiddenException(inner)
}
crate::operation::update_channel::UpdateChannelError::InternalServerErrorException(
inner,
) => Error::InternalServerErrorException(inner),
crate::operation::update_channel::UpdateChannelError::NotFoundException(inner) => {
Error::NotFoundException(inner)
}
crate::operation::update_channel::UpdateChannelError::ServiceUnavailableException(
inner,
) => Error::ServiceUnavailableException(inner),
crate::operation::update_channel::UpdateChannelError::TooManyRequestsException(
inner,
) => Error::TooManyRequestsException(inner),
crate::operation::update_channel::UpdateChannelError::UnprocessableEntityException(
inner,
) => Error::UnprocessableEntityException(inner),
crate::operation::update_channel::UpdateChannelError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::update_origin_endpoint::UpdateOriginEndpointError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::update_origin_endpoint::UpdateOriginEndpointError,
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_origin_endpoint::UpdateOriginEndpointError> for Error {
fn from(err: crate::operation::update_origin_endpoint::UpdateOriginEndpointError) -> Self {
match err {
crate::operation::update_origin_endpoint::UpdateOriginEndpointError::ForbiddenException(inner) => Error::ForbiddenException(inner),
crate::operation::update_origin_endpoint::UpdateOriginEndpointError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
crate::operation::update_origin_endpoint::UpdateOriginEndpointError::NotFoundException(inner) => Error::NotFoundException(inner),
crate::operation::update_origin_endpoint::UpdateOriginEndpointError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
crate::operation::update_origin_endpoint::UpdateOriginEndpointError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::operation::update_origin_endpoint::UpdateOriginEndpointError::UnprocessableEntityException(inner) => Error::UnprocessableEntityException(inner),
crate::operation::update_origin_endpoint::UpdateOriginEndpointError::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::ForbiddenException(e) => e.request_id(),
Self::InternalServerErrorException(e) => e.request_id(),
Self::NotFoundException(e) => e.request_id(),
Self::ServiceUnavailableException(e) => e.request_id(),
Self::TooManyRequestsException(e) => e.request_id(),
Self::UnprocessableEntityException(e) => e.request_id(),
Self::Unhandled(e) => e.request_id(),
}
}
}