pub enum AgentClientError {
Show 13 variants
Connect {
path: PathBuf,
source: Error,
},
Handshake(String),
SandboxNotFound(String),
InvalidSandboxName(String),
Io(Error),
Protocol(ProtocolError),
Cbor(String),
InvalidPacket(String),
UnsupportedOperation {
msg_type: &'static str,
needs: u8,
peer: u8,
},
ReaderClosed(u32),
Closed,
IdRangeExhausted,
NotImplemented(&'static str),
}Expand description
Errors raised by AgentClient.
Variants§
Connect
Failed to open the Unix socket connection to the relay.
Handshake(String)
Handshake with the relay failed (timeout, EOF, or malformed frame).
SandboxNotFound(String)
Sandbox name could not be resolved to an agent socket path.
InvalidSandboxName(String)
Sandbox name failed SDK validation before socket resolution.
Io(Error)
An I/O error occurred on the socket after connect.
Protocol(ProtocolError)
A wire-protocol error (framing, CBOR, oversize frame).
Cbor(String)
CBOR encoding or decoding failed.
InvalidPacket(String)
The supplied packet did not contain exactly one complete transport frame.
UnsupportedOperation
The connected sandbox’s runtime is older than the requested feature needs.
Raised before any bytes go out, so a feature the runtime is too old to
handle fails on its own without disturbing the rest of the session.
Restarting the sandbox re-provisions agentd at the current version, which
is the fix. See VERSIONING.md in microsandbox-protocol.
Fields
ReaderClosed(u32)
The reader task closed (socket EOF or client closed) before the in-flight request received its response.
Closed
The client has been closed.
IdRangeExhausted
The relay-assigned correlation ID range has no available IDs.
NotImplemented(&'static str)
The operation is not implemented yet.
Trait Implementations§
Source§impl Debug for AgentClientError
impl Debug for AgentClientError
Source§impl Display for AgentClientError
impl Display for AgentClientError
Source§impl Error for AgentClientError
impl Error for AgentClientError
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
use the Display impl or to_string()