pub enum ErrorData {
Show 23 variants
InvalidCommand {
message: String,
},
CommandNotFound {
command_id: String,
},
CommandTargetNotFound {
resource_id: String,
deployment_id: String,
},
CommandTargetAmbiguous {
deployment_id: String,
},
NoCommandTargets {
deployment_id: String,
},
CommandTargetIdInvalid {
resource_id: String,
},
CommandReceiverConfigInvalid {
message: String,
env_var: String,
},
CommandReceiverUnauthorized {
operation: String,
url: String,
},
CommandReceiverRequestRejected {
operation: String,
status: u16,
url: String,
},
InvalidStateTransition {
from: String,
to: String,
},
CommandExpired {
command_id: String,
},
StorageOperationFailed {
message: String,
operation: Option<String>,
path: Option<String>,
},
KvOperationFailed {
operation: String,
key: String,
message: String,
},
TransportDispatchFailed {
message: String,
transport_type: Option<String>,
target: Option<String>,
},
TransportDispatchRejected {
message: String,
transport_type: Option<String>,
target: Option<String>,
},
InvalidEnvelope {
message: String,
field: Option<String>,
},
AgentError {
message: String,
deployment_id: Option<String>,
},
SerializationFailed {
message: String,
data_type: Option<String>,
},
HttpOperationFailed {
message: String,
method: Option<String>,
url: Option<String>,
},
OperationNotSupported {
message: String,
operation: Option<String>,
},
Conflict {
message: String,
resource_id: Option<String>,
},
LeaseNotFound {
lease_id: String,
},
Other {
message: String,
},
}Expand description
Errors that occur in the commands protocol.
Variants§
InvalidCommand
Command validation failed or contains invalid data.
CommandNotFound
Requested command ID was not found.
CommandTargetNotFound
Explicitly requested command target does not exist in the deployment (or is not command-capable). Also returned for an empty resource id.
404 mirrors the crate’s other lookup failures (COMMAND_NOT_FOUND, LEASE_NOT_FOUND): the named resource does not exist.
Fields
CommandTargetAmbiguous
Single-target shorthand was used but the deployment has multiple command-capable targets.
409 mirrors CONFLICT: the request conflicts with the deployment’s current state and the client resolves it by naming a target.
NoCommandTargets
The deployment has no command-capable targets at all.
422: the request is well-formed but unsatisfiable for this deployment (no resource has commands enabled) — unlike 400 (malformed) or 404 (a specific named thing missing).
CommandTargetIdInvalid
A command target resource id contains :, which would break the
pending-index and idempotency-key delimiter grammar.
400: the request (or a stored target) is malformed. The commands layer
permits every resource-id character except :, which delimits key
segments.
CommandReceiverConfigInvalid
Pull command receiver configuration from the environment is missing
or invalid (e.g. a required ALIEN_COMMANDS_* variable is absent).
Fields
The command receiver bearer token was rejected by the commands API.
Fields
Command API operation that was rejected
Commands API URL that rejected the token
CommandReceiverRequestRejected
The command receiver request was permanently rejected by the commands API.
Fields
InvalidStateTransition
Invalid state transition attempted on command.
CommandExpired
Command has expired and can no longer be processed.
StorageOperationFailed
Storage backend operation failed.
Fields
KvOperationFailed
Key-value store operation failed.
Fields
TransportDispatchFailed
Transport dispatch to agent failed.
Fields
TransportDispatchRejected
Transport rejected a command before accepting it for execution.
Unlike an acknowledgement timeout, this is a definite non-delivery: the command server may safely record a terminal delivery failure.
Fields
InvalidEnvelope
Command envelope validation or parsing failed.
Fields
AgentError
Agent reported an error during command processing.
Fields
SerializationFailed
Serialization or deserialization operation failed.
Fields
HttpOperationFailed
HTTP operation failed during command processing.
Fields
OperationNotSupported
Operation is not supported by the current configuration.
Fields
Conflict
Resource conflict detected (e.g., concurrent modification).
Fields
LeaseNotFound
Requested lease ID was not found.
Other
Generic commands error for uncommon cases.
Trait Implementations§
Source§impl AlienErrorData for ErrorData
impl AlienErrorData for ErrorData
Source§fn http_status_code(&self) -> u16
fn http_status_code(&self) -> u16
Source§fn retryable_inherit(&self) -> Option<bool>
fn retryable_inherit(&self) -> Option<bool>
Source§fn internal_inherit(&self) -> Option<bool>
fn internal_inherit(&self) -> Option<bool>
Source§fn http_status_code_inherit(&self) -> Option<u16>
fn http_status_code_inherit(&self) -> Option<u16>
Source§fn human_layer_presentation(&self) -> HumanLayerPresentation
fn human_layer_presentation(&self) -> HumanLayerPresentation
Source§impl<'de> Deserialize<'de> for ErrorData
impl<'de> Deserialize<'de> for ErrorData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ErrorData
impl RefUnwindSafe for ErrorData
impl Send for ErrorData
impl Sync for ErrorData
impl Unpin for ErrorData
impl UnsafeUnpin for ErrorData
impl UnwindSafe for ErrorData
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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