#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum Error {
BadRequestError(crate::error::BadRequestError),
ForbiddenError(crate::error::ForbiddenError),
InternalError(crate::error::InternalError),
NotFoundError(crate::error::NotFoundError),
RateLimitError(crate::error::RateLimitError),
UnauthorizedError(crate::error::UnauthorizedError),
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::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<R> From<aws_smithy_http::result::SdkError<crate::error::CompleteGroupAvatarUploadError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CompleteGroupAvatarUploadError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::CompleteGroupAvatarUploadErrorKind::InternalError(inner) => {
Error::InternalError(inner)
}
crate::error::CompleteGroupAvatarUploadErrorKind::RateLimitError(inner) => {
Error::RateLimitError(inner)
}
crate::error::CompleteGroupAvatarUploadErrorKind::ForbiddenError(inner) => {
Error::ForbiddenError(inner)
}
crate::error::CompleteGroupAvatarUploadErrorKind::UnauthorizedError(inner) => {
Error::UnauthorizedError(inner)
}
crate::error::CompleteGroupAvatarUploadErrorKind::NotFoundError(inner) => {
Error::NotFoundError(inner)
}
crate::error::CompleteGroupAvatarUploadErrorKind::BadRequestError(inner) => {
Error::BadRequestError(inner)
}
crate::error::CompleteGroupAvatarUploadErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ConsumeGroupInviteError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::ConsumeGroupInviteError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::ConsumeGroupInviteErrorKind::InternalError(inner) => {
Error::InternalError(inner)
}
crate::error::ConsumeGroupInviteErrorKind::RateLimitError(inner) => {
Error::RateLimitError(inner)
}
crate::error::ConsumeGroupInviteErrorKind::ForbiddenError(inner) => {
Error::ForbiddenError(inner)
}
crate::error::ConsumeGroupInviteErrorKind::UnauthorizedError(inner) => {
Error::UnauthorizedError(inner)
}
crate::error::ConsumeGroupInviteErrorKind::NotFoundError(inner) => {
Error::NotFoundError(inner)
}
crate::error::ConsumeGroupInviteErrorKind::BadRequestError(inner) => {
Error::BadRequestError(inner)
}
crate::error::ConsumeGroupInviteErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateGroupError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::CreateGroupError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::CreateGroupErrorKind::InternalError(inner) => {
Error::InternalError(inner)
}
crate::error::CreateGroupErrorKind::RateLimitError(inner) => {
Error::RateLimitError(inner)
}
crate::error::CreateGroupErrorKind::ForbiddenError(inner) => {
Error::ForbiddenError(inner)
}
crate::error::CreateGroupErrorKind::UnauthorizedError(inner) => {
Error::UnauthorizedError(inner)
}
crate::error::CreateGroupErrorKind::NotFoundError(inner) => {
Error::NotFoundError(inner)
}
crate::error::CreateGroupErrorKind::BadRequestError(inner) => {
Error::BadRequestError(inner)
}
crate::error::CreateGroupErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateGroupInviteError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CreateGroupInviteError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::CreateGroupInviteErrorKind::InternalError(inner) => {
Error::InternalError(inner)
}
crate::error::CreateGroupInviteErrorKind::RateLimitError(inner) => {
Error::RateLimitError(inner)
}
crate::error::CreateGroupInviteErrorKind::ForbiddenError(inner) => {
Error::ForbiddenError(inner)
}
crate::error::CreateGroupInviteErrorKind::UnauthorizedError(inner) => {
Error::UnauthorizedError(inner)
}
crate::error::CreateGroupInviteErrorKind::NotFoundError(inner) => {
Error::NotFoundError(inner)
}
crate::error::CreateGroupInviteErrorKind::BadRequestError(inner) => {
Error::BadRequestError(inner)
}
crate::error::CreateGroupInviteErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateGroupJoinRequestError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CreateGroupJoinRequestError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::CreateGroupJoinRequestErrorKind::InternalError(inner) => {
Error::InternalError(inner)
}
crate::error::CreateGroupJoinRequestErrorKind::RateLimitError(inner) => {
Error::RateLimitError(inner)
}
crate::error::CreateGroupJoinRequestErrorKind::ForbiddenError(inner) => {
Error::ForbiddenError(inner)
}
crate::error::CreateGroupJoinRequestErrorKind::UnauthorizedError(inner) => {
Error::UnauthorizedError(inner)
}
crate::error::CreateGroupJoinRequestErrorKind::NotFoundError(inner) => {
Error::NotFoundError(inner)
}
crate::error::CreateGroupJoinRequestErrorKind::BadRequestError(inner) => {
Error::BadRequestError(inner)
}
crate::error::CreateGroupJoinRequestErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetGroupInviteError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::GetGroupInviteError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::GetGroupInviteErrorKind::InternalError(inner) => {
Error::InternalError(inner)
}
crate::error::GetGroupInviteErrorKind::RateLimitError(inner) => {
Error::RateLimitError(inner)
}
crate::error::GetGroupInviteErrorKind::ForbiddenError(inner) => {
Error::ForbiddenError(inner)
}
crate::error::GetGroupInviteErrorKind::UnauthorizedError(inner) => {
Error::UnauthorizedError(inner)
}
crate::error::GetGroupInviteErrorKind::NotFoundError(inner) => {
Error::NotFoundError(inner)
}
crate::error::GetGroupInviteErrorKind::BadRequestError(inner) => {
Error::BadRequestError(inner)
}
crate::error::GetGroupInviteErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetGroupProfileError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::GetGroupProfileError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::GetGroupProfileErrorKind::InternalError(inner) => {
Error::InternalError(inner)
}
crate::error::GetGroupProfileErrorKind::RateLimitError(inner) => {
Error::RateLimitError(inner)
}
crate::error::GetGroupProfileErrorKind::ForbiddenError(inner) => {
Error::ForbiddenError(inner)
}
crate::error::GetGroupProfileErrorKind::UnauthorizedError(inner) => {
Error::UnauthorizedError(inner)
}
crate::error::GetGroupProfileErrorKind::NotFoundError(inner) => {
Error::NotFoundError(inner)
}
crate::error::GetGroupProfileErrorKind::BadRequestError(inner) => {
Error::BadRequestError(inner)
}
crate::error::GetGroupProfileErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetGroupSummaryError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::GetGroupSummaryError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::GetGroupSummaryErrorKind::InternalError(inner) => {
Error::InternalError(inner)
}
crate::error::GetGroupSummaryErrorKind::RateLimitError(inner) => {
Error::RateLimitError(inner)
}
crate::error::GetGroupSummaryErrorKind::ForbiddenError(inner) => {
Error::ForbiddenError(inner)
}
crate::error::GetGroupSummaryErrorKind::UnauthorizedError(inner) => {
Error::UnauthorizedError(inner)
}
crate::error::GetGroupSummaryErrorKind::NotFoundError(inner) => {
Error::NotFoundError(inner)
}
crate::error::GetGroupSummaryErrorKind::BadRequestError(inner) => {
Error::BadRequestError(inner)
}
crate::error::GetGroupSummaryErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::JoinGroupError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::JoinGroupError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::JoinGroupErrorKind::InternalError(inner) => {
Error::InternalError(inner)
}
crate::error::JoinGroupErrorKind::RateLimitError(inner) => {
Error::RateLimitError(inner)
}
crate::error::JoinGroupErrorKind::ForbiddenError(inner) => {
Error::ForbiddenError(inner)
}
crate::error::JoinGroupErrorKind::UnauthorizedError(inner) => {
Error::UnauthorizedError(inner)
}
crate::error::JoinGroupErrorKind::NotFoundError(inner) => {
Error::NotFoundError(inner)
}
crate::error::JoinGroupErrorKind::BadRequestError(inner) => {
Error::BadRequestError(inner)
}
crate::error::JoinGroupErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::LeaveGroupError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::LeaveGroupError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::LeaveGroupErrorKind::InternalError(inner) => {
Error::InternalError(inner)
}
crate::error::LeaveGroupErrorKind::RateLimitError(inner) => {
Error::RateLimitError(inner)
}
crate::error::LeaveGroupErrorKind::ForbiddenError(inner) => {
Error::ForbiddenError(inner)
}
crate::error::LeaveGroupErrorKind::UnauthorizedError(inner) => {
Error::UnauthorizedError(inner)
}
crate::error::LeaveGroupErrorKind::NotFoundError(inner) => {
Error::NotFoundError(inner)
}
crate::error::LeaveGroupErrorKind::BadRequestError(inner) => {
Error::BadRequestError(inner)
}
crate::error::LeaveGroupErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListSuggestedGroupsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::ListSuggestedGroupsError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::ListSuggestedGroupsErrorKind::InternalError(inner) => {
Error::InternalError(inner)
}
crate::error::ListSuggestedGroupsErrorKind::RateLimitError(inner) => {
Error::RateLimitError(inner)
}
crate::error::ListSuggestedGroupsErrorKind::ForbiddenError(inner) => {
Error::ForbiddenError(inner)
}
crate::error::ListSuggestedGroupsErrorKind::UnauthorizedError(inner) => {
Error::UnauthorizedError(inner)
}
crate::error::ListSuggestedGroupsErrorKind::NotFoundError(inner) => {
Error::NotFoundError(inner)
}
crate::error::ListSuggestedGroupsErrorKind::BadRequestError(inner) => {
Error::BadRequestError(inner)
}
crate::error::ListSuggestedGroupsErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::PrepareGroupAvatarUploadError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::PrepareGroupAvatarUploadError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::PrepareGroupAvatarUploadErrorKind::InternalError(inner) => {
Error::InternalError(inner)
}
crate::error::PrepareGroupAvatarUploadErrorKind::RateLimitError(inner) => {
Error::RateLimitError(inner)
}
crate::error::PrepareGroupAvatarUploadErrorKind::ForbiddenError(inner) => {
Error::ForbiddenError(inner)
}
crate::error::PrepareGroupAvatarUploadErrorKind::UnauthorizedError(inner) => {
Error::UnauthorizedError(inner)
}
crate::error::PrepareGroupAvatarUploadErrorKind::NotFoundError(inner) => {
Error::NotFoundError(inner)
}
crate::error::PrepareGroupAvatarUploadErrorKind::BadRequestError(inner) => {
Error::BadRequestError(inner)
}
crate::error::PrepareGroupAvatarUploadErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ResolveGroupJoinRequestError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::ResolveGroupJoinRequestError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::ResolveGroupJoinRequestErrorKind::InternalError(inner) => {
Error::InternalError(inner)
}
crate::error::ResolveGroupJoinRequestErrorKind::RateLimitError(inner) => {
Error::RateLimitError(inner)
}
crate::error::ResolveGroupJoinRequestErrorKind::ForbiddenError(inner) => {
Error::ForbiddenError(inner)
}
crate::error::ResolveGroupJoinRequestErrorKind::UnauthorizedError(inner) => {
Error::UnauthorizedError(inner)
}
crate::error::ResolveGroupJoinRequestErrorKind::NotFoundError(inner) => {
Error::NotFoundError(inner)
}
crate::error::ResolveGroupJoinRequestErrorKind::BadRequestError(inner) => {
Error::BadRequestError(inner)
}
crate::error::ResolveGroupJoinRequestErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::SearchGroupsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::SearchGroupsError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::SearchGroupsErrorKind::InternalError(inner) => {
Error::InternalError(inner)
}
crate::error::SearchGroupsErrorKind::RateLimitError(inner) => {
Error::RateLimitError(inner)
}
crate::error::SearchGroupsErrorKind::ForbiddenError(inner) => {
Error::ForbiddenError(inner)
}
crate::error::SearchGroupsErrorKind::UnauthorizedError(inner) => {
Error::UnauthorizedError(inner)
}
crate::error::SearchGroupsErrorKind::NotFoundError(inner) => {
Error::NotFoundError(inner)
}
crate::error::SearchGroupsErrorKind::BadRequestError(inner) => {
Error::BadRequestError(inner)
}
crate::error::SearchGroupsErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::TransferGroupOwnershipError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::TransferGroupOwnershipError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::TransferGroupOwnershipErrorKind::InternalError(inner) => {
Error::InternalError(inner)
}
crate::error::TransferGroupOwnershipErrorKind::RateLimitError(inner) => {
Error::RateLimitError(inner)
}
crate::error::TransferGroupOwnershipErrorKind::ForbiddenError(inner) => {
Error::ForbiddenError(inner)
}
crate::error::TransferGroupOwnershipErrorKind::UnauthorizedError(inner) => {
Error::UnauthorizedError(inner)
}
crate::error::TransferGroupOwnershipErrorKind::NotFoundError(inner) => {
Error::NotFoundError(inner)
}
crate::error::TransferGroupOwnershipErrorKind::BadRequestError(inner) => {
Error::BadRequestError(inner)
}
crate::error::TransferGroupOwnershipErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UpdateGroupProfileError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::UpdateGroupProfileError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::UpdateGroupProfileErrorKind::InternalError(inner) => {
Error::InternalError(inner)
}
crate::error::UpdateGroupProfileErrorKind::RateLimitError(inner) => {
Error::RateLimitError(inner)
}
crate::error::UpdateGroupProfileErrorKind::ForbiddenError(inner) => {
Error::ForbiddenError(inner)
}
crate::error::UpdateGroupProfileErrorKind::UnauthorizedError(inner) => {
Error::UnauthorizedError(inner)
}
crate::error::UpdateGroupProfileErrorKind::NotFoundError(inner) => {
Error::NotFoundError(inner)
}
crate::error::UpdateGroupProfileErrorKind::BadRequestError(inner) => {
Error::BadRequestError(inner)
}
crate::error::UpdateGroupProfileErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ValidateGroupProfileError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::ValidateGroupProfileError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::ValidateGroupProfileErrorKind::InternalError(inner) => {
Error::InternalError(inner)
}
crate::error::ValidateGroupProfileErrorKind::RateLimitError(inner) => {
Error::RateLimitError(inner)
}
crate::error::ValidateGroupProfileErrorKind::ForbiddenError(inner) => {
Error::ForbiddenError(inner)
}
crate::error::ValidateGroupProfileErrorKind::UnauthorizedError(inner) => {
Error::UnauthorizedError(inner)
}
crate::error::ValidateGroupProfileErrorKind::NotFoundError(inner) => {
Error::NotFoundError(inner)
}
crate::error::ValidateGroupProfileErrorKind::BadRequestError(inner) => {
Error::BadRequestError(inner)
}
crate::error::ValidateGroupProfileErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl std::error::Error for Error {}