Enum aws_sdk_translate::Error
source · #[non_exhaustive]pub enum Error {
Show 16 variants
ConcurrentModificationException(ConcurrentModificationException),
ConflictException(ConflictException),
DetectedLanguageLowConfidenceException(DetectedLanguageLowConfidenceException),
InternalServerException(InternalServerException),
InvalidFilterException(InvalidFilterException),
InvalidParameterValueException(InvalidParameterValueException),
InvalidRequestException(InvalidRequestException),
LimitExceededException(LimitExceededException),
ResourceNotFoundException(ResourceNotFoundException),
ServiceUnavailableException(ServiceUnavailableException),
TextSizeLimitExceededException(TextSizeLimitExceededException),
TooManyRequestsException(TooManyRequestsException),
TooManyTagsException(TooManyTagsException),
UnsupportedDisplayLanguageCodeException(UnsupportedDisplayLanguageCodeException),
UnsupportedLanguagePairException(UnsupportedLanguagePairException),
Unhandled(Unhandled),
}
Expand description
All possible error types for this service.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ConcurrentModificationException(ConcurrentModificationException)
Another modification is being made. That modification must complete before you can make your change.
ConflictException(ConflictException)
There was a conflict processing the request. Try your request again.
DetectedLanguageLowConfidenceException(DetectedLanguageLowConfidenceException)
The confidence that Amazon Comprehend accurately detected the source language is low. If a low confidence level is acceptable for your application, you can use the language in the exception to call Amazon Translate again. For more information, see the DetectDominantLanguage operation in the Amazon Comprehend Developer Guide.
InternalServerException(InternalServerException)
An internal server error occurred. Retry your request.
InvalidFilterException(InvalidFilterException)
The filter specified for the operation is not valid. Specify a different filter.
InvalidParameterValueException(InvalidParameterValueException)
The value of the parameter is not valid. Review the value of the parameter you are using to correct it, and then retry your operation.
InvalidRequestException(InvalidRequestException)
The request that you made is not valid. Check your request to determine why it's not valid and then retry the request.
LimitExceededException(LimitExceededException)
The specified limit has been exceeded. Review your request and retry it with a quantity below the stated limit.
ResourceNotFoundException(ResourceNotFoundException)
The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request.
The Amazon Translate service is temporarily unavailable. Wait a bit and then retry your request.
TextSizeLimitExceededException(TextSizeLimitExceededException)
The size of the text you submitted exceeds the size limit. Reduce the size of the text or use a smaller document and then retry your request.
TooManyRequestsException(TooManyRequestsException)
You have made too many requests within a short period of time. Wait for a short time and then try your request again.
TooManyTagsException(TooManyTagsException)
You have added too many tags to this resource. The maximum is 50 tags.
UnsupportedDisplayLanguageCodeException(UnsupportedDisplayLanguageCodeException)
Requested display language code is not supported.
UnsupportedLanguagePairException(UnsupportedLanguagePairException)
Amazon Translate does not support translation from the language of the source text into the requested target language. For more information, see Supported languages.
Unhandled(Unhandled)
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
for what information is available for the error.An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<BuildError> for Error
impl From<BuildError> for Error
source§fn from(value: BuildError) -> Self
fn from(value: BuildError) -> Self
source§impl From<CreateParallelDataError> for Error
impl From<CreateParallelDataError> for Error
source§fn from(err: CreateParallelDataError) -> Self
fn from(err: CreateParallelDataError) -> Self
source§impl From<DeleteParallelDataError> for Error
impl From<DeleteParallelDataError> for Error
source§fn from(err: DeleteParallelDataError) -> Self
fn from(err: DeleteParallelDataError) -> Self
source§impl From<DeleteTerminologyError> for Error
impl From<DeleteTerminologyError> for Error
source§fn from(err: DeleteTerminologyError) -> Self
fn from(err: DeleteTerminologyError) -> Self
source§impl From<DescribeTextTranslationJobError> for Error
impl From<DescribeTextTranslationJobError> for Error
source§fn from(err: DescribeTextTranslationJobError) -> Self
fn from(err: DescribeTextTranslationJobError) -> Self
source§impl From<GetParallelDataError> for Error
impl From<GetParallelDataError> for Error
source§fn from(err: GetParallelDataError) -> Self
fn from(err: GetParallelDataError) -> Self
source§impl From<GetTerminologyError> for Error
impl From<GetTerminologyError> for Error
source§fn from(err: GetTerminologyError) -> Self
fn from(err: GetTerminologyError) -> Self
source§impl From<ImportTerminologyError> for Error
impl From<ImportTerminologyError> for Error
source§fn from(err: ImportTerminologyError) -> Self
fn from(err: ImportTerminologyError) -> Self
source§impl From<ListLanguagesError> for Error
impl From<ListLanguagesError> for Error
source§fn from(err: ListLanguagesError) -> Self
fn from(err: ListLanguagesError) -> Self
source§impl From<ListParallelDataError> for Error
impl From<ListParallelDataError> for Error
source§fn from(err: ListParallelDataError) -> Self
fn from(err: ListParallelDataError) -> Self
source§impl From<ListTagsForResourceError> for Error
impl From<ListTagsForResourceError> for Error
source§fn from(err: ListTagsForResourceError) -> Self
fn from(err: ListTagsForResourceError) -> Self
source§impl From<ListTerminologiesError> for Error
impl From<ListTerminologiesError> for Error
source§fn from(err: ListTerminologiesError) -> Self
fn from(err: ListTerminologiesError) -> Self
source§impl From<ListTextTranslationJobsError> for Error
impl From<ListTextTranslationJobsError> for Error
source§fn from(err: ListTextTranslationJobsError) -> Self
fn from(err: ListTextTranslationJobsError) -> Self
source§impl<R> From<SdkError<CreateParallelDataError, R>> for Error
impl<R> From<SdkError<CreateParallelDataError, R>> for Error
source§fn from(err: SdkError<CreateParallelDataError, R>) -> Self
fn from(err: SdkError<CreateParallelDataError, R>) -> Self
source§impl<R> From<SdkError<DeleteParallelDataError, R>> for Error
impl<R> From<SdkError<DeleteParallelDataError, R>> for Error
source§fn from(err: SdkError<DeleteParallelDataError, R>) -> Self
fn from(err: SdkError<DeleteParallelDataError, R>) -> Self
source§impl<R> From<SdkError<DeleteTerminologyError, R>> for Error
impl<R> From<SdkError<DeleteTerminologyError, R>> for Error
source§fn from(err: SdkError<DeleteTerminologyError, R>) -> Self
fn from(err: SdkError<DeleteTerminologyError, R>) -> Self
source§impl<R> From<SdkError<DescribeTextTranslationJobError, R>> for Error
impl<R> From<SdkError<DescribeTextTranslationJobError, R>> for Error
source§fn from(err: SdkError<DescribeTextTranslationJobError, R>) -> Self
fn from(err: SdkError<DescribeTextTranslationJobError, R>) -> Self
source§impl<R> From<SdkError<GetParallelDataError, R>> for Error
impl<R> From<SdkError<GetParallelDataError, R>> for Error
source§fn from(err: SdkError<GetParallelDataError, R>) -> Self
fn from(err: SdkError<GetParallelDataError, R>) -> Self
source§impl<R> From<SdkError<GetTerminologyError, R>> for Error
impl<R> From<SdkError<GetTerminologyError, R>> for Error
source§fn from(err: SdkError<GetTerminologyError, R>) -> Self
fn from(err: SdkError<GetTerminologyError, R>) -> Self
source§impl<R> From<SdkError<ImportTerminologyError, R>> for Error
impl<R> From<SdkError<ImportTerminologyError, R>> for Error
source§fn from(err: SdkError<ImportTerminologyError, R>) -> Self
fn from(err: SdkError<ImportTerminologyError, R>) -> Self
source§impl<R> From<SdkError<ListLanguagesError, R>> for Error
impl<R> From<SdkError<ListLanguagesError, R>> for Error
source§fn from(err: SdkError<ListLanguagesError, R>) -> Self
fn from(err: SdkError<ListLanguagesError, R>) -> Self
source§impl<R> From<SdkError<ListParallelDataError, R>> for Error
impl<R> From<SdkError<ListParallelDataError, R>> for Error
source§fn from(err: SdkError<ListParallelDataError, R>) -> Self
fn from(err: SdkError<ListParallelDataError, R>) -> Self
source§impl<R> From<SdkError<ListTagsForResourceError, R>> for Error
impl<R> From<SdkError<ListTagsForResourceError, R>> for Error
source§fn from(err: SdkError<ListTagsForResourceError, R>) -> Self
fn from(err: SdkError<ListTagsForResourceError, R>) -> Self
source§impl<R> From<SdkError<ListTerminologiesError, R>> for Error
impl<R> From<SdkError<ListTerminologiesError, R>> for Error
source§fn from(err: SdkError<ListTerminologiesError, R>) -> Self
fn from(err: SdkError<ListTerminologiesError, R>) -> Self
source§impl<R> From<SdkError<ListTextTranslationJobsError, R>> for Error
impl<R> From<SdkError<ListTextTranslationJobsError, R>> for Error
source§fn from(err: SdkError<ListTextTranslationJobsError, R>) -> Self
fn from(err: SdkError<ListTextTranslationJobsError, R>) -> Self
source§impl<R> From<SdkError<StartTextTranslationJobError, R>> for Error
impl<R> From<SdkError<StartTextTranslationJobError, R>> for Error
source§fn from(err: SdkError<StartTextTranslationJobError, R>) -> Self
fn from(err: SdkError<StartTextTranslationJobError, R>) -> Self
source§impl<R> From<SdkError<StopTextTranslationJobError, R>> for Error
impl<R> From<SdkError<StopTextTranslationJobError, R>> for Error
source§fn from(err: SdkError<StopTextTranslationJobError, R>) -> Self
fn from(err: SdkError<StopTextTranslationJobError, R>) -> Self
source§impl<R> From<SdkError<TagResourceError, R>> for Error
impl<R> From<SdkError<TagResourceError, R>> for Error
source§fn from(err: SdkError<TagResourceError, R>) -> Self
fn from(err: SdkError<TagResourceError, R>) -> Self
source§impl<R> From<SdkError<TranslateDocumentError, R>> for Error
impl<R> From<SdkError<TranslateDocumentError, R>> for Error
source§fn from(err: SdkError<TranslateDocumentError, R>) -> Self
fn from(err: SdkError<TranslateDocumentError, R>) -> Self
source§impl<R> From<SdkError<TranslateTextError, R>> for Error
impl<R> From<SdkError<TranslateTextError, R>> for Error
source§fn from(err: SdkError<TranslateTextError, R>) -> Self
fn from(err: SdkError<TranslateTextError, R>) -> Self
source§impl<R> From<SdkError<UntagResourceError, R>> for Error
impl<R> From<SdkError<UntagResourceError, R>> for Error
source§fn from(err: SdkError<UntagResourceError, R>) -> Self
fn from(err: SdkError<UntagResourceError, R>) -> Self
source§impl<R> From<SdkError<UpdateParallelDataError, R>> for Error
impl<R> From<SdkError<UpdateParallelDataError, R>> for Error
source§fn from(err: SdkError<UpdateParallelDataError, R>) -> Self
fn from(err: SdkError<UpdateParallelDataError, R>) -> Self
source§impl From<StartTextTranslationJobError> for Error
impl From<StartTextTranslationJobError> for Error
source§fn from(err: StartTextTranslationJobError) -> Self
fn from(err: StartTextTranslationJobError) -> Self
source§impl From<StopTextTranslationJobError> for Error
impl From<StopTextTranslationJobError> for Error
source§fn from(err: StopTextTranslationJobError) -> Self
fn from(err: StopTextTranslationJobError) -> Self
source§impl From<TagResourceError> for Error
impl From<TagResourceError> for Error
source§fn from(err: TagResourceError) -> Self
fn from(err: TagResourceError) -> Self
source§impl From<TranslateDocumentError> for Error
impl From<TranslateDocumentError> for Error
source§fn from(err: TranslateDocumentError) -> Self
fn from(err: TranslateDocumentError) -> Self
source§impl From<TranslateTextError> for Error
impl From<TranslateTextError> for Error
source§fn from(err: TranslateTextError) -> Self
fn from(err: TranslateTextError) -> Self
source§impl From<UntagResourceError> for Error
impl From<UntagResourceError> for Error
source§fn from(err: UntagResourceError) -> Self
fn from(err: UntagResourceError) -> Self
source§impl From<UpdateParallelDataError> for Error
impl From<UpdateParallelDataError> for Error
source§fn from(err: UpdateParallelDataError) -> Self
fn from(err: UpdateParallelDataError) -> Self
source§impl ProvideErrorMetadata for Error
impl ProvideErrorMetadata for Error
source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more