// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT. /// All possible error types for this service. #[non_exhaustive] #[derive(std::fmt::Debug)] pub enum Error { /// An error thrown when the requestee has sent an invalid or malformed request. BadRequestError(crate::error::BadRequestError), /// An error thrown when the requestee requests a resource they do not have access to. ForbiddenError(crate::error::ForbiddenError), /// An error caused by internal server problems. InternalError(crate::error::InternalError), /// An error thrown when the requestee requests a non existant resource. NotFoundError(crate::error::NotFoundError), /// An error thrown when the requestee has hit a rate limit. You are sending too many requests too quickly. RateLimitError(crate::error::RateLimitError), /// An error thrown when the requestee is not authenticated. UnauthorizedError(crate::error::UnauthorizedError), /// An unhandled error occurred. Unhandled(Box), } impl std::fmt::Display for Error { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Error::BadRequestError(inner) => inner.fmt(f), Error::ForbiddenError(inner) => inner.fmt(f), Error::InternalError(inner) => inner.fmt(f), Error::NotFoundError(inner) => inner.fmt(f), Error::RateLimitError(inner) => inner.fmt(f), Error::UnauthorizedError(inner) => inner.fmt(f), Error::Unhandled(inner) => inner.fmt(f), } } } impl From> for Error where R: Send + Sync + std::fmt::Debug + 'static, { fn from(err: aws_smithy_http::result::SdkError) -> Self { match err { aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind { crate::error::GetDirectThreadErrorKind::InternalError(inner) => { Error::InternalError(inner) } crate::error::GetDirectThreadErrorKind::RateLimitError(inner) => { Error::RateLimitError(inner) } crate::error::GetDirectThreadErrorKind::ForbiddenError(inner) => { Error::ForbiddenError(inner) } crate::error::GetDirectThreadErrorKind::UnauthorizedError(inner) => { Error::UnauthorizedError(inner) } crate::error::GetDirectThreadErrorKind::NotFoundError(inner) => { Error::NotFoundError(inner) } crate::error::GetDirectThreadErrorKind::BadRequestError(inner) => { Error::BadRequestError(inner) } crate::error::GetDirectThreadErrorKind::Unhandled(inner) => Error::Unhandled(inner), }, _ => Error::Unhandled(err.into()), } } } impl From> for Error where R: Send + Sync + std::fmt::Debug + 'static, { fn from( err: aws_smithy_http::result::SdkError, ) -> Self { match err { aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind { crate::error::GetThreadHistoryErrorKind::InternalError(inner) => { Error::InternalError(inner) } crate::error::GetThreadHistoryErrorKind::RateLimitError(inner) => { Error::RateLimitError(inner) } crate::error::GetThreadHistoryErrorKind::ForbiddenError(inner) => { Error::ForbiddenError(inner) } crate::error::GetThreadHistoryErrorKind::UnauthorizedError(inner) => { Error::UnauthorizedError(inner) } crate::error::GetThreadHistoryErrorKind::NotFoundError(inner) => { Error::NotFoundError(inner) } crate::error::GetThreadHistoryErrorKind::BadRequestError(inner) => { Error::BadRequestError(inner) } crate::error::GetThreadHistoryErrorKind::Unhandled(inner) => { Error::Unhandled(inner) } }, _ => Error::Unhandled(err.into()), } } } impl From> for Error where R: Send + Sync + std::fmt::Debug + 'static, { fn from(err: aws_smithy_http::result::SdkError) -> Self { match err { aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind { crate::error::GetThreadTopicErrorKind::InternalError(inner) => { Error::InternalError(inner) } crate::error::GetThreadTopicErrorKind::RateLimitError(inner) => { Error::RateLimitError(inner) } crate::error::GetThreadTopicErrorKind::ForbiddenError(inner) => { Error::ForbiddenError(inner) } crate::error::GetThreadTopicErrorKind::UnauthorizedError(inner) => { Error::UnauthorizedError(inner) } crate::error::GetThreadTopicErrorKind::NotFoundError(inner) => { Error::NotFoundError(inner) } crate::error::GetThreadTopicErrorKind::BadRequestError(inner) => { Error::BadRequestError(inner) } crate::error::GetThreadTopicErrorKind::Unhandled(inner) => Error::Unhandled(inner), }, _ => Error::Unhandled(err.into()), } } } impl From> for Error where R: Send + Sync + std::fmt::Debug + 'static, { fn from(err: aws_smithy_http::result::SdkError) -> Self { match err { aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind { crate::error::SendChatMessageErrorKind::InternalError(inner) => { Error::InternalError(inner) } crate::error::SendChatMessageErrorKind::RateLimitError(inner) => { Error::RateLimitError(inner) } crate::error::SendChatMessageErrorKind::ForbiddenError(inner) => { Error::ForbiddenError(inner) } crate::error::SendChatMessageErrorKind::UnauthorizedError(inner) => { Error::UnauthorizedError(inner) } crate::error::SendChatMessageErrorKind::NotFoundError(inner) => { Error::NotFoundError(inner) } crate::error::SendChatMessageErrorKind::BadRequestError(inner) => { Error::BadRequestError(inner) } crate::error::SendChatMessageErrorKind::Unhandled(inner) => Error::Unhandled(inner), }, _ => Error::Unhandled(err.into()), } } } impl From> for Error where R: Send + Sync + std::fmt::Debug + 'static, { fn from(err: aws_smithy_http::result::SdkError) -> Self { match err { aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind { crate::error::SetThreadReadErrorKind::InternalError(inner) => { Error::InternalError(inner) } crate::error::SetThreadReadErrorKind::RateLimitError(inner) => { Error::RateLimitError(inner) } crate::error::SetThreadReadErrorKind::ForbiddenError(inner) => { Error::ForbiddenError(inner) } crate::error::SetThreadReadErrorKind::UnauthorizedError(inner) => { Error::UnauthorizedError(inner) } crate::error::SetThreadReadErrorKind::NotFoundError(inner) => { Error::NotFoundError(inner) } crate::error::SetThreadReadErrorKind::BadRequestError(inner) => { Error::BadRequestError(inner) } crate::error::SetThreadReadErrorKind::Unhandled(inner) => Error::Unhandled(inner), }, _ => Error::Unhandled(err.into()), } } } impl From> for Error where R: Send + Sync + std::fmt::Debug + 'static, { fn from(err: aws_smithy_http::result::SdkError) -> Self { match err { aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind { crate::error::SetTypingStatusErrorKind::InternalError(inner) => { Error::InternalError(inner) } crate::error::SetTypingStatusErrorKind::RateLimitError(inner) => { Error::RateLimitError(inner) } crate::error::SetTypingStatusErrorKind::ForbiddenError(inner) => { Error::ForbiddenError(inner) } crate::error::SetTypingStatusErrorKind::UnauthorizedError(inner) => { Error::UnauthorizedError(inner) } crate::error::SetTypingStatusErrorKind::NotFoundError(inner) => { Error::NotFoundError(inner) } crate::error::SetTypingStatusErrorKind::BadRequestError(inner) => { Error::BadRequestError(inner) } crate::error::SetTypingStatusErrorKind::Unhandled(inner) => Error::Unhandled(inner), }, _ => Error::Unhandled(err.into()), } } } impl From> for Error where R: Send + Sync + std::fmt::Debug + 'static, { fn from(err: aws_smithy_http::result::SdkError) -> Self { match err { aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind { crate::error::WatchThreadErrorKind::InternalError(inner) => { Error::InternalError(inner) } crate::error::WatchThreadErrorKind::RateLimitError(inner) => { Error::RateLimitError(inner) } crate::error::WatchThreadErrorKind::ForbiddenError(inner) => { Error::ForbiddenError(inner) } crate::error::WatchThreadErrorKind::UnauthorizedError(inner) => { Error::UnauthorizedError(inner) } crate::error::WatchThreadErrorKind::NotFoundError(inner) => { Error::NotFoundError(inner) } crate::error::WatchThreadErrorKind::BadRequestError(inner) => { Error::BadRequestError(inner) } crate::error::WatchThreadErrorKind::Unhandled(inner) => Error::Unhandled(inner), }, _ => Error::Unhandled(err.into()), } } } impl std::error::Error for Error {}