#[non_exhaustive]pub enum CallbackErrorKind {
#[non_exhaustive] TimedOut,
#[non_exhaustive] HeartbeatTimedOut,
#[non_exhaustive] ExternalFailure,
#[non_exhaustive] DeserializationFailed,
#[non_exhaustive] Internal,
#[non_exhaustive] SubmitterFailed,
}Expand description
Specific kinds of callback failures.
The external/internal split separates user-attributable errors (timeout, invalid payload) from SDK/service failures.
§Examples
use aws_durable_execution_sdk::CallbackErrorKind;
fn is_external(kind: &CallbackErrorKind) -> bool {
matches!(
kind,
CallbackErrorKind::TimedOut { .. }
| CallbackErrorKind::HeartbeatTimedOut { .. }
| CallbackErrorKind::ExternalFailure { .. }
| CallbackErrorKind::SubmitterFailed { .. }
)
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
#[non_exhaustive]TimedOut
The callback timed out waiting for completion.
The enclosing error’s OperationError::wire record keeps the
callback record’s message and error data. An absent or empty message
becomes Callback timed out. From wait_for_callback, the wire
record has type Callback.Timeout.
#[non_exhaustive]HeartbeatTimedOut
The callback heartbeat timed out (no keep-alive received in time).
The service records a heartbeat timeout as a TIMED_OUT callback
with the error type Callback.Heartbeat. Both create_callback
and wait_for_callback report it with this kind. The enclosing
error’s OperationError::wire record keeps the callback record’s
message and error data. An absent or empty message becomes
Callback timed out. From wait_for_callback, the wire record has
type Callback.Heartbeat.
#[non_exhaustive]ExternalFailure
The callback record is FAILED, CANCELLED or STOPPED, whatever
its error type: an external system failed the callback, or the
service cancelled or stopped it.
The failure fields travel as wire data. Read them from the error’s
source() (a ReplayedFailure) or
from OperationError::wire. From create_callback, the wire
record keeps the callback record’s error type, error data and stack
trace. It keeps a nonempty message and otherwise uses
Callback failed. From wait_for_callback, the wire record has the
type Callback.ExternalFailure. It keeps the callback record’s error
data and the same normalized message. The callback operation’s
stored record keeps the external type and original message field.
#[non_exhaustive]DeserializationFailed
The callback payload could not be deserialized.
This is a payload decode failure that the serdes did not mark with
RetryableSerdesError; a
marked failure ends the invocation instead. From create_callback,
create_callback(..).await succeeds, and
Callback::result or
Callback::spawn_result returns
this permanent error, live and on replay. From
wait_for_callback, the outer operation’s record has already
succeeded with the raw payload, and this error is the decode of that
payload with the operation’s serdes. So every invocation that reads
the record fails the same way.
#[non_exhaustive]Internal
An internal SDK or service error occurred.
#[non_exhaustive]SubmitterFailed
The wait_for_callback submitter failed and its retry strategy stopped.
Live, source() is the submitter step’s OperationError. On replay,
source() is a ReplayedFailure holding the recorded outer failure.
Trait Implementations§
Source§impl Debug for CallbackErrorKind
impl Debug for CallbackErrorKind
Auto Trait Implementations§
impl Forget for CallbackErrorKind
impl Freeze for CallbackErrorKind
impl Move for CallbackErrorKind
impl RefUnwindSafe for CallbackErrorKind
impl Send for CallbackErrorKind
impl Sync for CallbackErrorKind
impl Unpin for CallbackErrorKind
impl UnsafeUnpin for CallbackErrorKind
impl UnwindSafe for CallbackErrorKind
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