// 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 {
/// <p>Your request has the same name as another active human loop but has different input data. You cannot start two human loops with the same name and different input data.</p>
ConflictException(crate::error::ConflictException),
/// <p>We couldn't process your request because of an issue with the server. Try again later.</p>
InternalServerException(crate::error::InternalServerException),
/// <p>We couldn't find the requested resource. Check that your resources exists and were created in the same AWS Region as your request, and try your request again. </p>
ResourceNotFoundException(crate::error::ResourceNotFoundException),
/// <p>You exceeded your service quota. Service quotas, also referred to as limits, are the maximum number of service resources or operations for your AWS account. For a list of Amazon A2I service quotes, see <a href="https://docs.aws.amazon.com/general/latest/gr/a2i.html">Amazon Augmented AI Service Quotes</a>. Delete some resources or request an increase in your service quota. You can request a quota increase using Service Quotas or the AWS Support Center. To request an increase, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html">AWS Service Quotas</a> in the <i>AWS General Reference</i>.</p>
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
/// <p>You exceeded the maximum number of requests.</p>
ThrottlingException(crate::error::ThrottlingException),
/// <p>The request isn't valid. Check the syntax and try again.</p>
ValidationException(crate::error::ValidationException),
///
/// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
///
/// When logging an error from the SDK, it is recommended that you either wrap the error in
/// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
/// error reporter library that visits the error's cause/source chain, or call
/// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
///
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
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(inner) => inner.fmt(f),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteHumanLoopError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::DeleteHumanLoopError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DeleteHumanLoopError> for Error {
fn from(err: crate::error::DeleteHumanLoopError) -> Self {
match err.kind {
crate::error::DeleteHumanLoopErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::DeleteHumanLoopErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DeleteHumanLoopErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::DeleteHumanLoopErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::DeleteHumanLoopErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeHumanLoopError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeHumanLoopError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DescribeHumanLoopError> for Error {
fn from(err: crate::error::DescribeHumanLoopError) -> Self {
match err.kind {
crate::error::DescribeHumanLoopErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::DescribeHumanLoopErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DescribeHumanLoopErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::DescribeHumanLoopErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::DescribeHumanLoopErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListHumanLoopsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::ListHumanLoopsError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::ListHumanLoopsError> for Error {
fn from(err: crate::error::ListHumanLoopsError) -> Self {
match err.kind {
crate::error::ListHumanLoopsErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::ListHumanLoopsErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::ListHumanLoopsErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::ListHumanLoopsErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::ListHumanLoopsErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::StartHumanLoopError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::StartHumanLoopError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::StartHumanLoopError> for Error {
fn from(err: crate::error::StartHumanLoopError) -> Self {
match err.kind {
crate::error::StartHumanLoopErrorKind::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::error::StartHumanLoopErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::StartHumanLoopErrorKind::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::error::StartHumanLoopErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::StartHumanLoopErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::StartHumanLoopErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::StopHumanLoopError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::StopHumanLoopError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::StopHumanLoopError> for Error {
fn from(err: crate::error::StopHumanLoopError) -> Self {
match err.kind {
crate::error::StopHumanLoopErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::StopHumanLoopErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::StopHumanLoopErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::StopHumanLoopErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::StopHumanLoopErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl std::error::Error for Error {}