pub struct ErrorEnvelope {
pub exit_code: i32,
pub error_code: String,
pub message: String,
pub remote_exit_code: Option<i32>,
pub error_class: ErrorClass,
pub retryable: bool,
pub suggestion: Option<String>,
pub target_resolved: Option<String>,
pub target_source: Option<TargetSource>,
pub host_resolved: Option<String>,
pub host_source: Option<TargetSource>,
pub active_fallback: Option<bool>,
}Expand description
Stderr failure envelope when JSON errors mode is active.
Agents must read retryable / error_class before re-invoking (Rules Rust —
retry/backoff). Historical clients that only inspect exit_code remain valid
(additionalProperties / unknown-field ignore on the consumer side).
Fields§
§exit_code: i32Process exit code (sysexits-inspired).
error_code: StringStable machine code (vps_not_found, tls, …) — G-ERR-08.
message: StringHuman-readable message (may be localized).
remote_exit_code: Option<i32>Optional remote shell exit when process exit is general failure.
error_class: ErrorClassHigh-level class (transient | permanent | cancelled).
retryable: boolWhether an agent may re-invoke with the same argv after backoff.
suggestion: Option<String>Optional short remediation hint for agents.
target_resolved: Option<String>Host this process had resolved when the failure occurred (canonical name).
GAP-SSH-EXEC-ENVELOPE-002 asks for the audit fields on the error path because the failing step is where the target matters most: a step-zero failure on the wrong machine and one on the right machine were byte-identical envelopes.
Absent — not empty — when the failure predates target resolution, which is
most usage errors. None says “no host was chosen”; "" would assert that a
host was chosen and is nameless. Only one of those is true.
target_source: Option<TargetSource>How Self::target_resolved was obtained (canonical name).
host_resolved: Option<String>Compatibility alias of Self::target_resolved (0.5.5 spelling).
Written from the same value, never independently — see
crate::json_wire::TargetEcho for why both spellings ship.
host_source: Option<TargetSource>Compatibility alias of Self::target_source (0.5.5 spelling).
active_fallback: Option<bool>Whether that host came from the active marker instead of argv.
Trait Implementations§
Source§impl Clone for ErrorEnvelope
impl Clone for ErrorEnvelope
Source§fn clone(&self) -> ErrorEnvelope
fn clone(&self) -> ErrorEnvelope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ErrorEnvelope
impl Debug for ErrorEnvelope
Source§impl<'de> Deserialize<'de> for ErrorEnvelope
impl<'de> Deserialize<'de> for ErrorEnvelope
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>,
impl Eq for ErrorEnvelope
Source§impl PartialEq for ErrorEnvelope
impl PartialEq for ErrorEnvelope
Source§impl Serialize for ErrorEnvelope
impl Serialize for ErrorEnvelope
impl StructuralPartialEq for ErrorEnvelope
Auto Trait Implementations§
impl Freeze for ErrorEnvelope
impl RefUnwindSafe for ErrorEnvelope
impl Send for ErrorEnvelope
impl Sync for ErrorEnvelope
impl Unpin for ErrorEnvelope
impl UnsafeUnpin for ErrorEnvelope
impl UnwindSafe for ErrorEnvelope
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.