Enum aws_sdk_sagemakerruntime::Error
source · #[non_exhaustive]pub enum Error {
InternalDependencyException(InternalDependencyException),
InternalFailure(InternalFailure),
InternalStreamFailure(InternalStreamFailure),
ModelError(ModelError),
ModelNotReadyException(ModelNotReadyException),
ModelStreamError(ModelStreamError),
ServiceUnavailable(ServiceUnavailable),
ValidationError(ValidationError),
Unhandled(Unhandled),
}
Expand description
All possible error types for this service.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InternalDependencyException(InternalDependencyException)
Your request caused an exception with an internal dependency. Contact customer support.
InternalFailure(InternalFailure)
An internal failure occurred.
InternalStreamFailure(InternalStreamFailure)
The stream processing failed because of an unknown error, exception or failure. Try your request again.
ModelError(ModelError)
Model (owned by the customer in the container) returned 4xx or 5xx error code.
ModelNotReadyException(ModelNotReadyException)
Either a serverless endpoint variant's resources are still being provisioned, or a multi-model endpoint is still downloading or loading the target model. Wait and try your request again.
ModelStreamError(ModelStreamError)
An error occurred while streaming the response body. This error can have the following error codes:
- ModelInvocationTimeExceeded
-
The model failed to finish sending the response within the timeout period allowed by Amazon SageMaker.
- StreamBroken
-
The Transmission Control Protocol (TCP) connection between the client and the model was reset or closed.
The service is unavailable. Try your call again.
ValidationError(ValidationError)
Inspect your request and try again.
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<InvokeEndpointAsyncError> for Error
impl From<InvokeEndpointAsyncError> for Error
source§fn from(err: InvokeEndpointAsyncError) -> Self
fn from(err: InvokeEndpointAsyncError) -> Self
source§impl From<InvokeEndpointError> for Error
impl From<InvokeEndpointError> for Error
source§fn from(err: InvokeEndpointError) -> Self
fn from(err: InvokeEndpointError) -> Self
source§impl From<InvokeEndpointWithResponseStreamError> for Error
impl From<InvokeEndpointWithResponseStreamError> for Error
source§fn from(err: InvokeEndpointWithResponseStreamError) -> Self
fn from(err: InvokeEndpointWithResponseStreamError) -> Self
source§impl From<ResponseStreamError> for Error
impl From<ResponseStreamError> for Error
source§fn from(err: ResponseStreamError) -> Self
fn from(err: ResponseStreamError) -> Self
source§impl<R> From<SdkError<InvokeEndpointAsyncError, R>> for Error
impl<R> From<SdkError<InvokeEndpointAsyncError, R>> for Error
source§fn from(err: SdkError<InvokeEndpointAsyncError, R>) -> Self
fn from(err: SdkError<InvokeEndpointAsyncError, R>) -> Self
source§impl<R> From<SdkError<InvokeEndpointError, R>> for Error
impl<R> From<SdkError<InvokeEndpointError, R>> for Error
source§fn from(err: SdkError<InvokeEndpointError, R>) -> Self
fn from(err: SdkError<InvokeEndpointError, R>) -> Self
source§impl<R> From<SdkError<InvokeEndpointWithResponseStreamError, R>> for Error
impl<R> From<SdkError<InvokeEndpointWithResponseStreamError, R>> for Error
source§fn from(err: SdkError<InvokeEndpointWithResponseStreamError, R>) -> Self
fn from(err: SdkError<InvokeEndpointWithResponseStreamError, R>) -> Self
source§impl<R> From<SdkError<ResponseStreamError, R>> for Error
impl<R> From<SdkError<ResponseStreamError, R>> for Error
source§fn from(err: SdkError<ResponseStreamError, R>) -> Self
fn from(err: SdkError<ResponseStreamError, R>) -> 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