#[non_exhaustive]pub enum ErrorCode {
Show 24 variants
Ok,
Cancelled,
Unknown,
InvalidArgument,
DeadlineExceeded,
NotFound,
AlreadyExists,
PermissionDenied,
ResourceExhausted,
FailedPrecondition,
Aborted,
OutOfRange,
Unimplemented,
Internal,
Unavailable,
DataLoss,
Unauthenticated,
HeartbeatLost,
LeaseExpired,
LeaseRevoked,
BackpressureOverflow,
BudgetExhausted,
LeaseSubsetViolation,
AgentVersionNotAvailable,
}Expand description
Canonical wire-level error code (RFC §18.2).
RATE_LIMITED is an alias for RESOURCE_EXHAUSTED per §18.2 and is
represented by the same variant; the alias survives only at the
deserialise boundary.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Ok
OK — not an error; reserved.
Cancelled
CANCELLED
Unknown
UNKNOWN
InvalidArgument
INVALID_ARGUMENT
DeadlineExceeded
DEADLINE_EXCEEDED
NotFound
NOT_FOUND
AlreadyExists
ALREADY_EXISTS
PermissionDenied
PERMISSION_DENIED
ResourceExhausted
RESOURCE_EXHAUSTED (also serialised from the alias RATE_LIMITED).
FailedPrecondition
FAILED_PRECONDITION
Aborted
ABORTED
OutOfRange
OUT_OF_RANGE
Unimplemented
UNIMPLEMENTED
Internal
INTERNAL
UNAVAILABLE
DataLoss
DATA_LOSS
Unauthenticated
UNAUTHENTICATED
HeartbeatLost
HEARTBEAT_LOST (RFC §10.3)
LeaseExpired
LEASE_EXPIRED (RFC §15.5)
LeaseRevoked
LEASE_REVOKED (RFC §15.5)
BackpressureOverflow
BACKPRESSURE_OVERFLOW
BudgetExhausted
BUDGET_EXHAUSTED (ARCP v1.1 §12; §9.6)
LeaseSubsetViolation
LEASE_SUBSET_VIOLATION (ARCP v1.1 §9.4)
AgentVersionNotAvailable
AGENT_VERSION_NOT_AVAILABLE (ARCP v1.1 §12; §7.5)
Implementations§
Source§impl ErrorCode
impl ErrorCode
Sourcepub const fn retryable(self) -> bool
pub const fn retryable(self) -> bool
Default retryability per RFC §18.3.
Errors flagged retryable here MAY still be rejected by application policy; conversely, errors flagged non-retryable MAY be retried by callers who know more than the protocol does. This method reports only the protocol’s default.