#[non_exhaustive]pub enum ARCPError {
Show 26 variants
Cancelled {
reason: String,
},
InvalidArgument {
detail: String,
},
DeadlineExceeded {
detail: String,
},
NotFound {
kind: &'static str,
id: String,
},
AlreadyExists {
kind: &'static str,
id: String,
},
PermissionDenied {
detail: String,
},
ResourceExhausted {
detail: String,
retry_after_seconds: Option<u64>,
},
FailedPrecondition {
detail: String,
},
Aborted {
detail: String,
},
OutOfRange {
detail: String,
},
Unimplemented {
section: &'static str,
detail: String,
},
Internal {
detail: String,
},
Unavailable {
detail: String,
},
DataLoss {
detail: String,
},
Unauthenticated {
detail: String,
},
HeartbeatLost {
missed_count: u32,
},
LeaseExpired {
lease_id: LeaseId,
},
LeaseRevoked {
lease_id: LeaseId,
reason: String,
},
BackpressureOverflow {
detail: String,
},
BudgetExhausted {
detail: String,
},
LeaseSubsetViolation {
detail: String,
},
AgentVersionNotAvailable {
agent: String,
version: String,
},
Unknown {
detail: String,
},
Serialization(Error),
Storage {
detail: String,
},
Id(IdParseError),
}Expand description
In-process error type returned from library APIs.
Maps 1:1 onto the canonical ErrorCode taxonomy, with extra context on
each variant so call sites can build a structured error envelope (§18.1)
directly. The variants are #[non_exhaustive] so the taxonomy can grow
without a breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Cancelled
Operation was cancelled by the caller, the runtime, or by policy.
InvalidArgument
Malformed or invalid argument.
DeadlineExceeded
Operation timed out before completion.
NotFound
Referenced entity does not exist.
Fields
AlreadyExists
Entity creation conflicted with an existing entity.
PermissionDenied
Caller lacks the required permission or lease.
ResourceExhausted
Quota or rate limit hit.
Fields
FailedPrecondition
Required pre-condition unmet (e.g. job not in cancellable state).
Aborted
Concurrency conflict or hard termination.
OutOfRange
Argument outside the valid range.
Unimplemented
Feature not supported by this runtime.
Fields
Internal
Internal runtime error. Should be rare and indicate a bug.
Transient unavailability; retry MAY succeed.
DataLoss
Unrecoverable data loss or corruption (e.g. retention expired).
Unauthenticated
Missing or invalid credentials.
HeartbeatLost
Job missed required heartbeats (RFC §10.3).
LeaseExpired
Operation attempted with an expired lease (RFC §15.5).
LeaseRevoked
Operation attempted with a revoked lease (RFC §15.5).
BackpressureOverflow
Subscription or stream dropped due to backpressure overflow.
BudgetExhausted
A cost.budget capability counter reached its maximum (ARCP v1.1 §9.6).
LeaseSubsetViolation
A delegated or child lease attempted to exceed its parent envelope.
AgentVersionNotAvailable
job.submit named an agent@version the runtime does not have (ARCP v1.1 §7.5).
Unknown
Unknown error. Avoid in favour of a specific code.
Serialization(Error)
JSON serialisation / deserialisation failure at the wire boundary.
Storage
Persistent storage failure (event log, artifact store). Carries a stringified description of the underlying driver error so this crate stays free of storage-backend dependencies.
Id(IdParseError)
Identifier failed to parse on a wire boundary.
Implementations§
Trait Implementations§
Source§impl Error for ARCPError
impl Error for ARCPError
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()