pub enum ClientError {
Show 28 variants
PathNotAbsolute(String),
PathNotNormalized(String),
PathReadOnly(String),
ProcessNotFound(u32),
ExecutionTimedOut {
process_id: String,
},
OperationTimedOut {
message: String,
details: Box<ResourceLimitDetails>,
},
TerminationFailed {
process_id: String,
reason: String,
},
ShellNotFound(String),
Kernel {
code: String,
message: String,
},
ResourceLimit {
code: String,
message: String,
details: Box<ResourceLimitDetails>,
},
InvalidConfig(String),
InvalidSchedule(String),
PastSchedule(String),
InvalidPackageSource(String),
PackageDownload(String),
PackageTooLarge {
observed: u64,
limit: u64,
},
PackageDigestMismatch {
expected: String,
actual: String,
},
InvalidPackageFormat(String),
PackageIo(String),
PackageAcquisition {
code: String,
message: String,
details: Box<ResourceLimitDetails>,
},
PackageCacheCapacity {
requested: u64,
current: u64,
limit: u64,
},
PackageCacheEntryCapacity {
current: usize,
limit: usize,
},
PackageCachePendingLimit {
limit: usize,
},
PackageCacheConfiguration(String),
SoftwareNotFound(String),
Transport(ProtocolCodecError),
Sidecar(String),
SidecarExited(String),
}Expand description
Typed error taxonomy for the client SDK.
Variants§
PathNotAbsolute(String)
A filesystem path was not absolute (did not start with /).
The message text matches the TypeScript AgentOs exactly (capital “P”). These strings are
observable data (they surface in BatchWriteResult.error / BatchReadResult.error), not
logs, so the casing follows TS rather than the lowercase log convention.
PathNotNormalized(String)
A filesystem path was not in posix-normalized form.
The message text matches the TypeScript AgentOs exactly (capital “P”).
PathReadOnly(String)
A write was attempted against a read-only path (for example /proc).
The message text matches the TypeScript AgentOs exactly (capital “P”).
ProcessNotFound(u32)
An SDK-spawned process with the given pid was not found.
The message text matches the TypeScript AgentOs exactly (capital “P”). These strings are
observable data (surfaced to callers), not logs, so the casing follows TS rather than the
lowercase log convention.
ExecutionTimedOut
The execution deadline expired after the guest’s exit was confirmed.
OperationTimedOut
A sidecar operation exceeded its deadline. Unlike ExecutionTimedOut, this does not assert successful guest termination or resource cleanup.
TerminationFailed
Observation or cleanup failed without proof of the guest’s exit.
ShellNotFound(String)
A shell with the given synthetic shell-N id was not found.
Kernel
A kernel/sidecar operation failed. The errno code string (ENOENT, EEXIST, ENOTDIR,
EACCES, EISDIR, ENOTEMPTY, …) is preserved verbatim for parity with the TypeScript
KernelError.
ResourceLimit
A sidecar policy/admission bound rejected an operation. Fields are copied from the lockstep wire response and never parsed from text.
InvalidConfig(String)
A caller-supplied config value was rejected before the VM was created.
InvalidSchedule(String)
A cron schedule string could not be parsed/validated.
PastSchedule(String)
A one-shot (ISO-8601) cron schedule resolved to a time in the past.
InvalidPackageSource(String)
A package source failed validation before any guest-visible mutation.
PackageDownload(String)
Remote package acquisition failed under the configured bounded policy.
PackageTooLarge
A package exceeded the configured acquisition byte limit.
PackageDigestMismatch
The acquired bytes did not match the caller-pinned content identity.
InvalidPackageFormat(String)
A downloaded file was not a bounded valid .aospkg container.
PackageIo(String)
Trusted host I/O failed while acquiring or staging a package.
PackageAcquisition
A package acquisition failed in the sidecar. The wire code is kept separately from the message because not every local package error can be reconstructed from a generic rejection without parsing its text. Preserve the same rejection metadata available to TypeScript callers.
PackageCacheCapacity
The process-local immutable package cache cannot admit another object without evicting a package still pinned by a live VM.
PackageCacheEntryCapacity
PackageCachePendingLimit
Too many distinct acquisitions are waiting in the process. The bound prevents unique untrusted URLs from growing the single-flight table.
PackageCacheConfiguration(String)
A process cache was already initialized with different operator-owned limits. Process-global configuration is first-write-once by design.
SoftwareNotFound(String)
An exact content-addressed installed package was not present.
Transport(ProtocolCodecError)
A framing/codec failure on the sidecar transport.
Sidecar(String)
A generic sidecar rejection or I/O failure with context.
SidecarExited(String)
The sidecar process exited or was killed, taking its VMs with it. Parity with TypeScript
SidecarProcessExited. Create a new VM to continue.
Implementations§
Source§impl ClientError
impl ClientError
Sourcepub fn batch_message(&self) -> String
pub fn batch_message(&self) -> String
Render this error the way the TypeScript AgentOs surfaces err.message into batch results
(BatchWriteResult.error / BatchReadResult.error).
The general Display impl carries a human/log-oriented prefix
(kernel error [<code>]: ...), but the batch surface is observable data that must match TS
byte-for-byte. For kernel failures TS reports KernelError.message, which is
<code>: <message> (and avoids doubling the code when the message already starts with it).
Path-guard variants already carry the exact TS strings via their Display impl.
Trait Implementations§
Source§impl Clone for ClientError
impl Clone for ClientError
Source§impl Debug for ClientError
impl Debug for ClientError
Source§impl Display for ClientError
impl Display for ClientError
Source§impl Error for ClientError
impl Error for ClientError
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()