#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
ConcurrentModificationException(crate::types::error::ConcurrentModificationException),
InvalidNextTokenException(crate::types::error::InvalidNextTokenException),
InvalidServiceRoleException(crate::types::error::InvalidServiceRoleException),
LimitExceededException(crate::types::error::LimitExceededException),
ProjectAlreadyExistsException(crate::types::error::ProjectAlreadyExistsException),
ProjectConfigurationException(crate::types::error::ProjectConfigurationException),
ProjectCreationFailedException(crate::types::error::ProjectCreationFailedException),
ProjectNotFoundException(crate::types::error::ProjectNotFoundException),
TeamMemberAlreadyAssociatedException(crate::types::error::TeamMemberAlreadyAssociatedException),
TeamMemberNotFoundException(crate::types::error::TeamMemberNotFoundException),
UserProfileAlreadyExistsException(crate::types::error::UserProfileAlreadyExistsException),
UserProfileNotFoundException(crate::types::error::UserProfileNotFoundException),
ValidationException(crate::types::error::ValidationException),
#[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
variable wildcard pattern and check `.code()`:
\
`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
\
See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
Unhandled(crate::error::sealed_unhandled::Unhandled),
}
impl ::std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::ConcurrentModificationException(inner) => inner.fmt(f),
Error::InvalidNextTokenException(inner) => inner.fmt(f),
Error::InvalidServiceRoleException(inner) => inner.fmt(f),
Error::LimitExceededException(inner) => inner.fmt(f),
Error::ProjectAlreadyExistsException(inner) => inner.fmt(f),
Error::ProjectConfigurationException(inner) => inner.fmt(f),
Error::ProjectCreationFailedException(inner) => inner.fmt(f),
Error::ProjectNotFoundException(inner) => inner.fmt(f),
Error::TeamMemberAlreadyAssociatedException(inner) => inner.fmt(f),
Error::TeamMemberNotFoundException(inner) => inner.fmt(f),
Error::UserProfileAlreadyExistsException(inner) => inner.fmt(f),
Error::UserProfileNotFoundException(inner) => inner.fmt(f),
Error::ValidationException(inner) => inner.fmt(f),
Error::Unhandled(_) => {
if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
write!(f, "unhandled error ({code})")
} else {
f.write_str("unhandled error")
}
}
}
}
}
impl From<::aws_smithy_types::error::operation::BuildError> for Error {
fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
source: value.into(),
meta: ::std::default::Default::default(),
})
}
}
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
match self {
Self::ConcurrentModificationException(inner) => inner.meta(),
Self::InvalidNextTokenException(inner) => inner.meta(),
Self::InvalidServiceRoleException(inner) => inner.meta(),
Self::LimitExceededException(inner) => inner.meta(),
Self::ProjectAlreadyExistsException(inner) => inner.meta(),
Self::ProjectConfigurationException(inner) => inner.meta(),
Self::ProjectCreationFailedException(inner) => inner.meta(),
Self::ProjectNotFoundException(inner) => inner.meta(),
Self::TeamMemberAlreadyAssociatedException(inner) => inner.meta(),
Self::TeamMemberNotFoundException(inner) => inner.meta(),
Self::UserProfileAlreadyExistsException(inner) => inner.meta(),
Self::UserProfileNotFoundException(inner) => inner.meta(),
Self::ValidationException(inner) => inner.meta(),
Self::Unhandled(inner) => &inner.meta,
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_team_member::AssociateTeamMemberError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_team_member::AssociateTeamMemberError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::associate_team_member::AssociateTeamMemberError> for Error {
fn from(err: crate::operation::associate_team_member::AssociateTeamMemberError) -> Self {
match err {
crate::operation::associate_team_member::AssociateTeamMemberError::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::operation::associate_team_member::AssociateTeamMemberError::InvalidServiceRoleException(inner) => {
Error::InvalidServiceRoleException(inner)
}
crate::operation::associate_team_member::AssociateTeamMemberError::LimitExceededException(inner) => Error::LimitExceededException(inner),
crate::operation::associate_team_member::AssociateTeamMemberError::ProjectConfigurationException(inner) => {
Error::ProjectConfigurationException(inner)
}
crate::operation::associate_team_member::AssociateTeamMemberError::ProjectNotFoundException(inner) => {
Error::ProjectNotFoundException(inner)
}
crate::operation::associate_team_member::AssociateTeamMemberError::TeamMemberAlreadyAssociatedException(inner) => {
Error::TeamMemberAlreadyAssociatedException(inner)
}
crate::operation::associate_team_member::AssociateTeamMemberError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::associate_team_member::AssociateTeamMemberError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_project::CreateProjectError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_project::CreateProjectError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::create_project::CreateProjectError> for Error {
fn from(err: crate::operation::create_project::CreateProjectError) -> Self {
match err {
crate::operation::create_project::CreateProjectError::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::operation::create_project::CreateProjectError::InvalidServiceRoleException(inner) => Error::InvalidServiceRoleException(inner),
crate::operation::create_project::CreateProjectError::LimitExceededException(inner) => Error::LimitExceededException(inner),
crate::operation::create_project::CreateProjectError::ProjectAlreadyExistsException(inner) => Error::ProjectAlreadyExistsException(inner),
crate::operation::create_project::CreateProjectError::ProjectConfigurationException(inner) => Error::ProjectConfigurationException(inner),
crate::operation::create_project::CreateProjectError::ProjectCreationFailedException(inner) => {
Error::ProjectCreationFailedException(inner)
}
crate::operation::create_project::CreateProjectError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_project::CreateProjectError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_user_profile::CreateUserProfileError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_user_profile::CreateUserProfileError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::create_user_profile::CreateUserProfileError> for Error {
fn from(err: crate::operation::create_user_profile::CreateUserProfileError) -> Self {
match err {
crate::operation::create_user_profile::CreateUserProfileError::UserProfileAlreadyExistsException(inner) => {
Error::UserProfileAlreadyExistsException(inner)
}
crate::operation::create_user_profile::CreateUserProfileError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_user_profile::CreateUserProfileError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_project::DeleteProjectError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_project::DeleteProjectError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::delete_project::DeleteProjectError> for Error {
fn from(err: crate::operation::delete_project::DeleteProjectError) -> Self {
match err {
crate::operation::delete_project::DeleteProjectError::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::operation::delete_project::DeleteProjectError::InvalidServiceRoleException(inner) => Error::InvalidServiceRoleException(inner),
crate::operation::delete_project::DeleteProjectError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_project::DeleteProjectError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_user_profile::DeleteUserProfileError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_user_profile::DeleteUserProfileError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::delete_user_profile::DeleteUserProfileError> for Error {
fn from(err: crate::operation::delete_user_profile::DeleteUserProfileError) -> Self {
match err {
crate::operation::delete_user_profile::DeleteUserProfileError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_user_profile::DeleteUserProfileError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_project::DescribeProjectError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_project::DescribeProjectError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_project::DescribeProjectError> for Error {
fn from(err: crate::operation::describe_project::DescribeProjectError) -> Self {
match err {
crate::operation::describe_project::DescribeProjectError::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::operation::describe_project::DescribeProjectError::InvalidServiceRoleException(inner) => Error::InvalidServiceRoleException(inner),
crate::operation::describe_project::DescribeProjectError::ProjectConfigurationException(inner) => {
Error::ProjectConfigurationException(inner)
}
crate::operation::describe_project::DescribeProjectError::ProjectNotFoundException(inner) => Error::ProjectNotFoundException(inner),
crate::operation::describe_project::DescribeProjectError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::describe_project::DescribeProjectError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_user_profile::DescribeUserProfileError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_user_profile::DescribeUserProfileError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::describe_user_profile::DescribeUserProfileError> for Error {
fn from(err: crate::operation::describe_user_profile::DescribeUserProfileError) -> Self {
match err {
crate::operation::describe_user_profile::DescribeUserProfileError::UserProfileNotFoundException(inner) => {
Error::UserProfileNotFoundException(inner)
}
crate::operation::describe_user_profile::DescribeUserProfileError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::describe_user_profile::DescribeUserProfileError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_team_member::DisassociateTeamMemberError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_team_member::DisassociateTeamMemberError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::disassociate_team_member::DisassociateTeamMemberError> for Error {
fn from(err: crate::operation::disassociate_team_member::DisassociateTeamMemberError) -> Self {
match err {
crate::operation::disassociate_team_member::DisassociateTeamMemberError::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::operation::disassociate_team_member::DisassociateTeamMemberError::InvalidServiceRoleException(inner) => {
Error::InvalidServiceRoleException(inner)
}
crate::operation::disassociate_team_member::DisassociateTeamMemberError::ProjectNotFoundException(inner) => {
Error::ProjectNotFoundException(inner)
}
crate::operation::disassociate_team_member::DisassociateTeamMemberError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::disassociate_team_member::DisassociateTeamMemberError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_projects::ListProjectsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_projects::ListProjectsError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_projects::ListProjectsError> for Error {
fn from(err: crate::operation::list_projects::ListProjectsError) -> Self {
match err {
crate::operation::list_projects::ListProjectsError::InvalidNextTokenException(inner) => Error::InvalidNextTokenException(inner),
crate::operation::list_projects::ListProjectsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_projects::ListProjectsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_resources::ListResourcesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_resources::ListResourcesError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_resources::ListResourcesError> for Error {
fn from(err: crate::operation::list_resources::ListResourcesError) -> Self {
match err {
crate::operation::list_resources::ListResourcesError::InvalidNextTokenException(inner) => Error::InvalidNextTokenException(inner),
crate::operation::list_resources::ListResourcesError::ProjectNotFoundException(inner) => Error::ProjectNotFoundException(inner),
crate::operation::list_resources::ListResourcesError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_resources::ListResourcesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_project::ListTagsForProjectError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_project::ListTagsForProjectError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_tags_for_project::ListTagsForProjectError> for Error {
fn from(err: crate::operation::list_tags_for_project::ListTagsForProjectError) -> Self {
match err {
crate::operation::list_tags_for_project::ListTagsForProjectError::InvalidNextTokenException(inner) => {
Error::InvalidNextTokenException(inner)
}
crate::operation::list_tags_for_project::ListTagsForProjectError::ProjectNotFoundException(inner) => {
Error::ProjectNotFoundException(inner)
}
crate::operation::list_tags_for_project::ListTagsForProjectError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_tags_for_project::ListTagsForProjectError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_team_members::ListTeamMembersError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_team_members::ListTeamMembersError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_team_members::ListTeamMembersError> for Error {
fn from(err: crate::operation::list_team_members::ListTeamMembersError) -> Self {
match err {
crate::operation::list_team_members::ListTeamMembersError::InvalidNextTokenException(inner) => Error::InvalidNextTokenException(inner),
crate::operation::list_team_members::ListTeamMembersError::ProjectNotFoundException(inner) => Error::ProjectNotFoundException(inner),
crate::operation::list_team_members::ListTeamMembersError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_team_members::ListTeamMembersError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_user_profiles::ListUserProfilesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_user_profiles::ListUserProfilesError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_user_profiles::ListUserProfilesError> for Error {
fn from(err: crate::operation::list_user_profiles::ListUserProfilesError) -> Self {
match err {
crate::operation::list_user_profiles::ListUserProfilesError::InvalidNextTokenException(inner) => Error::InvalidNextTokenException(inner),
crate::operation::list_user_profiles::ListUserProfilesError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_user_profiles::ListUserProfilesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_project::TagProjectError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_project::TagProjectError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::tag_project::TagProjectError> for Error {
fn from(err: crate::operation::tag_project::TagProjectError) -> Self {
match err {
crate::operation::tag_project::TagProjectError::ConcurrentModificationException(inner) => Error::ConcurrentModificationException(inner),
crate::operation::tag_project::TagProjectError::LimitExceededException(inner) => Error::LimitExceededException(inner),
crate::operation::tag_project::TagProjectError::ProjectNotFoundException(inner) => Error::ProjectNotFoundException(inner),
crate::operation::tag_project::TagProjectError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::tag_project::TagProjectError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_project::UntagProjectError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_project::UntagProjectError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::untag_project::UntagProjectError> for Error {
fn from(err: crate::operation::untag_project::UntagProjectError) -> Self {
match err {
crate::operation::untag_project::UntagProjectError::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::operation::untag_project::UntagProjectError::LimitExceededException(inner) => Error::LimitExceededException(inner),
crate::operation::untag_project::UntagProjectError::ProjectNotFoundException(inner) => Error::ProjectNotFoundException(inner),
crate::operation::untag_project::UntagProjectError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::untag_project::UntagProjectError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_project::UpdateProjectError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_project::UpdateProjectError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::update_project::UpdateProjectError> for Error {
fn from(err: crate::operation::update_project::UpdateProjectError) -> Self {
match err {
crate::operation::update_project::UpdateProjectError::ProjectNotFoundException(inner) => Error::ProjectNotFoundException(inner),
crate::operation::update_project::UpdateProjectError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::update_project::UpdateProjectError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_team_member::UpdateTeamMemberError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_team_member::UpdateTeamMemberError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::update_team_member::UpdateTeamMemberError> for Error {
fn from(err: crate::operation::update_team_member::UpdateTeamMemberError) -> Self {
match err {
crate::operation::update_team_member::UpdateTeamMemberError::ConcurrentModificationException(inner) => {
Error::ConcurrentModificationException(inner)
}
crate::operation::update_team_member::UpdateTeamMemberError::InvalidServiceRoleException(inner) => {
Error::InvalidServiceRoleException(inner)
}
crate::operation::update_team_member::UpdateTeamMemberError::LimitExceededException(inner) => Error::LimitExceededException(inner),
crate::operation::update_team_member::UpdateTeamMemberError::ProjectConfigurationException(inner) => {
Error::ProjectConfigurationException(inner)
}
crate::operation::update_team_member::UpdateTeamMemberError::ProjectNotFoundException(inner) => Error::ProjectNotFoundException(inner),
crate::operation::update_team_member::UpdateTeamMemberError::TeamMemberNotFoundException(inner) => {
Error::TeamMemberNotFoundException(inner)
}
crate::operation::update_team_member::UpdateTeamMemberError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::update_team_member::UpdateTeamMemberError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_user_profile::UpdateUserProfileError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_user_profile::UpdateUserProfileError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::update_user_profile::UpdateUserProfileError> for Error {
fn from(err: crate::operation::update_user_profile::UpdateUserProfileError) -> Self {
match err {
crate::operation::update_user_profile::UpdateUserProfileError::UserProfileNotFoundException(inner) => {
Error::UserProfileNotFoundException(inner)
}
crate::operation::update_user_profile::UpdateUserProfileError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::update_user_profile::UpdateUserProfileError::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::ConcurrentModificationException(inner) => inner.source(),
Error::InvalidNextTokenException(inner) => inner.source(),
Error::InvalidServiceRoleException(inner) => inner.source(),
Error::LimitExceededException(inner) => inner.source(),
Error::ProjectAlreadyExistsException(inner) => inner.source(),
Error::ProjectConfigurationException(inner) => inner.source(),
Error::ProjectCreationFailedException(inner) => inner.source(),
Error::ProjectNotFoundException(inner) => inner.source(),
Error::TeamMemberAlreadyAssociatedException(inner) => inner.source(),
Error::TeamMemberNotFoundException(inner) => inner.source(),
Error::UserProfileAlreadyExistsException(inner) => inner.source(),
Error::UserProfileNotFoundException(inner) => inner.source(),
Error::ValidationException(inner) => inner.source(),
Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
}
}
}
impl ::aws_types::request_id::RequestId for Error {
fn request_id(&self) -> Option<&str> {
match self {
Self::ConcurrentModificationException(e) => e.request_id(),
Self::InvalidNextTokenException(e) => e.request_id(),
Self::InvalidServiceRoleException(e) => e.request_id(),
Self::LimitExceededException(e) => e.request_id(),
Self::ProjectAlreadyExistsException(e) => e.request_id(),
Self::ProjectConfigurationException(e) => e.request_id(),
Self::ProjectCreationFailedException(e) => e.request_id(),
Self::ProjectNotFoundException(e) => e.request_id(),
Self::TeamMemberAlreadyAssociatedException(e) => e.request_id(),
Self::TeamMemberNotFoundException(e) => e.request_id(),
Self::UserProfileAlreadyExistsException(e) => e.request_id(),
Self::UserProfileNotFoundException(e) => e.request_id(),
Self::ValidationException(e) => e.request_id(),
Self::Unhandled(e) => e.meta.request_id(),
}
}
}