#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
AccessDeniedException(crate::types::error::AccessDeniedException),
ConflictException(crate::types::error::ConflictException),
InternalServerException(crate::types::error::InternalServerException),
ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
ThrottlingException(crate::types::error::ThrottlingException),
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::AccessDeniedException(inner) => inner.fmt(f),
Error::ConflictException(inner) => inner.fmt(f),
Error::InternalServerException(inner) => inner.fmt(f),
Error::ResourceNotFoundException(inner) => inner.fmt(f),
Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
Error::ThrottlingException(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::AccessDeniedException(inner) => inner.meta(),
Self::ConflictException(inner) => inner.meta(),
Self::InternalServerException(inner) => inner.meta(),
Self::ResourceNotFoundException(inner) => inner.meta(),
Self::ServiceQuotaExceededException(inner) => inner.meta(),
Self::ThrottlingException(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::cancel_participant_authentication::CancelParticipantAuthenticationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError,
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::cancel_participant_authentication::CancelParticipantAuthenticationError> for Error {
fn from(err: crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError) -> Self {
match err {
crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::cancel_participant_authentication::CancelParticipantAuthenticationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::complete_attachment_upload::CompleteAttachmentUploadError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::complete_attachment_upload::CompleteAttachmentUploadError, 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::complete_attachment_upload::CompleteAttachmentUploadError> for Error {
fn from(err: crate::operation::complete_attachment_upload::CompleteAttachmentUploadError) -> Self {
match err {
crate::operation::complete_attachment_upload::CompleteAttachmentUploadError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::complete_attachment_upload::CompleteAttachmentUploadError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::complete_attachment_upload::CompleteAttachmentUploadError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::complete_attachment_upload::CompleteAttachmentUploadError::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::operation::complete_attachment_upload::CompleteAttachmentUploadError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::complete_attachment_upload::CompleteAttachmentUploadError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::complete_attachment_upload::CompleteAttachmentUploadError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_participant_connection::CreateParticipantConnectionError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_participant_connection::CreateParticipantConnectionError, 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_participant_connection::CreateParticipantConnectionError> for Error {
fn from(err: crate::operation::create_participant_connection::CreateParticipantConnectionError) -> Self {
match err {
crate::operation::create_participant_connection::CreateParticipantConnectionError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::create_participant_connection::CreateParticipantConnectionError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::create_participant_connection::CreateParticipantConnectionError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::create_participant_connection::CreateParticipantConnectionError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::create_participant_connection::CreateParticipantConnectionError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_view::DescribeViewError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_view::DescribeViewError, 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_view::DescribeViewError> for Error {
fn from(err: crate::operation::describe_view::DescribeViewError) -> Self {
match err {
crate::operation::describe_view::DescribeViewError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::describe_view::DescribeViewError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::describe_view::DescribeViewError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::describe_view::DescribeViewError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::describe_view::DescribeViewError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::describe_view::DescribeViewError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disconnect_participant::DisconnectParticipantError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disconnect_participant::DisconnectParticipantError, 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::disconnect_participant::DisconnectParticipantError> for Error {
fn from(err: crate::operation::disconnect_participant::DisconnectParticipantError) -> Self {
match err {
crate::operation::disconnect_participant::DisconnectParticipantError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::disconnect_participant::DisconnectParticipantError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::disconnect_participant::DisconnectParticipantError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::disconnect_participant::DisconnectParticipantError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::disconnect_participant::DisconnectParticipantError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_attachment::GetAttachmentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_attachment::GetAttachmentError, 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::get_attachment::GetAttachmentError> for Error {
fn from(err: crate::operation::get_attachment::GetAttachmentError) -> Self {
match err {
crate::operation::get_attachment::GetAttachmentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_attachment::GetAttachmentError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_attachment::GetAttachmentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_attachment::GetAttachmentError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_attachment::GetAttachmentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_authentication_url::GetAuthenticationUrlError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_authentication_url::GetAuthenticationUrlError, 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::get_authentication_url::GetAuthenticationUrlError> for Error {
fn from(err: crate::operation::get_authentication_url::GetAuthenticationUrlError) -> Self {
match err {
crate::operation::get_authentication_url::GetAuthenticationUrlError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_authentication_url::GetAuthenticationUrlError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::get_authentication_url::GetAuthenticationUrlError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_authentication_url::GetAuthenticationUrlError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_authentication_url::GetAuthenticationUrlError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_transcript::GetTranscriptError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_transcript::GetTranscriptError, 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::get_transcript::GetTranscriptError> for Error {
fn from(err: crate::operation::get_transcript::GetTranscriptError) -> Self {
match err {
crate::operation::get_transcript::GetTranscriptError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_transcript::GetTranscriptError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_transcript::GetTranscriptError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_transcript::GetTranscriptError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_transcript::GetTranscriptError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::send_event::SendEventError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::send_event::SendEventError, 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::send_event::SendEventError> for Error {
fn from(err: crate::operation::send_event::SendEventError) -> Self {
match err {
crate::operation::send_event::SendEventError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::send_event::SendEventError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::send_event::SendEventError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::send_event::SendEventError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::send_event::SendEventError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::send_event::SendEventError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::send_message::SendMessageError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::send_message::SendMessageError, 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::send_message::SendMessageError> for Error {
fn from(err: crate::operation::send_message::SendMessageError) -> Self {
match err {
crate::operation::send_message::SendMessageError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::send_message::SendMessageError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::send_message::SendMessageError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::send_message::SendMessageError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::send_message::SendMessageError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_attachment_upload::StartAttachmentUploadError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_attachment_upload::StartAttachmentUploadError, 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::start_attachment_upload::StartAttachmentUploadError> for Error {
fn from(err: crate::operation::start_attachment_upload::StartAttachmentUploadError) -> Self {
match err {
crate::operation::start_attachment_upload::StartAttachmentUploadError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::start_attachment_upload::StartAttachmentUploadError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::start_attachment_upload::StartAttachmentUploadError::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::operation::start_attachment_upload::StartAttachmentUploadError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::start_attachment_upload::StartAttachmentUploadError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::start_attachment_upload::StartAttachmentUploadError::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::AccessDeniedException(inner) => inner.source(),
Error::ConflictException(inner) => inner.source(),
Error::InternalServerException(inner) => inner.source(),
Error::ResourceNotFoundException(inner) => inner.source(),
Error::ServiceQuotaExceededException(inner) => inner.source(),
Error::ThrottlingException(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::AccessDeniedException(e) => e.request_id(),
Self::ConflictException(e) => e.request_id(),
Self::InternalServerException(e) => e.request_id(),
Self::ResourceNotFoundException(e) => e.request_id(),
Self::ServiceQuotaExceededException(e) => e.request_id(),
Self::ThrottlingException(e) => e.request_id(),
Self::ValidationException(e) => e.request_id(),
Self::Unhandled(e) => e.meta.request_id(),
}
}
}