Skip to main content

ErrorCode

Enum ErrorCode 

Source
#[non_exhaustive]
pub enum ErrorCode {
Show 51 variants ParseError, InvalidRequest, MethodNotFound, InvalidParams, Internal, Overloaded, InputTooLarge, CapabilityRequired, NotFound, Interrupted, Cancelled, SessionNotFound, SessionInUse, SessionAmbiguous, ForkBoundaryInvalid, SessionNotLoaded, SessionStreamMismatch, DaemonDraining, LimitsAboveMax, WorkspaceNotTrusted, CommandRejected, Backpressured, SkillNotFound, ComputerUseUnavailable, MarketplaceNotFound, PluginNotFound, MarketplaceAlreadyExists, PluginMutationsDisabled, UploadNotFound, ViewTruncated, OutputUnavailable, Boundary, ApprovalNotFound, ApprovalAlreadyResolved, ApprovalChoiceInvalid, ApprovalRequirementStale, ApprovalReviewerUnavailable, UserInputNotFound, UserInputAlreadySettled, UserInputAnswerInvalid, MissingAnchor, PrunedPrefix, WrongStream, UnknownStream, UnknownProjection, AdmissionNotFound, AdmissionAlreadyResolved, AdmissionChoiceInvalid, UsageRefreshRateLimited, UsageRefreshUnavailable, UsageRefreshFailed,
}
Expand description

The v1 error codes enrolled in the public bundle.

Enrolment tracks what the BINARY can emit, not what the bundle’s method index has reached: the export is exact for the binary that produced it, so a code a v1 host puts on the wire is enrolled here even while its method’s params/result types are still pending. Of the -32060…-32069 raw-log block, only the five experimental rows are enrolled; the rest stays out because a v1 host never emits it.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

ParseError

-32700 — unparseable line.

§

InvalidRequest

-32600 — invalid frame or handshake ordering.

§

MethodNotFound

-32601 — unknown or ungated-experimental method.

§

InvalidParams

-32602 — malformed params or ungated-experimental field/variant.

§

Internal

-32603 — unexpected server failure.

§

Overloaded

-32001 — ingress saturated.

§

InputTooLarge

-32002 — frame or params over the limit.

§

CapabilityRequired

-32010 — missing capability grant.

§

NotFound

-32011 — run/item/subscription/cursor anchor missing.

§

Interrupted

-32013 — user interrupt pre-empted the request.

§

Cancelled

-32014 — cancellation pre-empted the request.

§

SessionNotFound

-32020 — no log resolves for sessionId.

§

SessionInUse

-32021 — writer lease held by another process.

§

SessionAmbiguous

-32022 — multiple canonical logs for the id.

§

ForkBoundaryInvalid

-32023 — cutPoint.lastTurnId unknown or in-progress.

§

SessionNotLoaded

-32024 — log exists but the session is not loaded on this host.

§

SessionStreamMismatch

-32025 — the store’s own stream id is not the requested session (a moved or renamed session directory).

§

DaemonDraining

-32039 — a drive-taking verb refused because this daemon is draining on the binary-change upgrade path; data.paths names the canonical socket to retry against.

§

LimitsAboveMax

-32028 — a session/start choice is wider than the host ceiling on at least one axis.

§

WorkspaceNotTrusted

-32029 — a worktree action names an untrusted repository.

§

CommandRejected

-32030 — durable runtime rejection; data.reason is snake_case.

§

Backpressured

-32031 — command-admission queue full; data.capacity present.

§

SkillNotFound

-32032 — the skill selector names no user-invocable skill in this session’s catalog.

§

ComputerUseUnavailable

-32033 — computer use is unavailable on this host.

§

MarketplaceNotFound

-32034 — the plugin verb names no configured marketplace.

§

PluginNotFound

-32035 — the install arm names no plugin in the named store.

§

MarketplaceAlreadyExists

-32036 — marketplace add over an already-configured name.

§

PluginMutationsDisabled

-32037 — the managed policy disables plugin mutation.

§

UploadNotFound

-32038 — a video input part names an upload id with no completed upload.

§

ViewTruncated

-32040 — requested range predates the retained view.

§

OutputUnavailable

-32041 — an item/readOutput ref exists but its bytes are not servable; data.availability carries the durable ToolOutputAvailability.

§

Boundary

-32042 — installed boundary pruned, unusable, or absent.

§

ApprovalNotFound

-32050 — approvalId names no approval record in this session.

§

ApprovalAlreadyResolved

-32051 — decide after the durable terminal.

§

ApprovalChoiceInvalid

-32052 — choiceId is not among the current availableChoices.

§

ApprovalRequirementStale

-32053 — requirementId is not the current requirement.

§

ApprovalReviewerUnavailable

-32054 — protected-write decision with no live reviewer.

§

UserInputNotFound

-32055 — userInputId names no prompt in this session.

§

UserInputAlreadySettled

-32056 — answer/cancel/clarify after settlement.

§

UserInputAnswerInvalid

-32057 — answers do not match the prompt’s questions or bounds.

§

MissingAnchor

-32060 — cursor anchor names no position of the requested stream.

§

PrunedPrefix

-32061 — anchor (or origin) falls in a retention-pruned prefix.

§

WrongStream

-32062 — anchor id belongs to a different stream of the session.

§

UnknownStream

-32063 — stream not present in the session.

§

UnknownProjection

-32064 — projection name not registered.

§

AdmissionNotFound

-32070 — admissionId names no admission record in this session.

§

AdmissionAlreadyResolved

-32071 — decide after the durable terminal.

§

AdmissionChoiceInvalid

-32072 — choiceId is not among the current availableChoices.

§

UsageRefreshRateLimited

-32080 — a usage/refresh inside the per-host window.

§

UsageRefreshUnavailable

-32081 — a usage/refresh with no Meta-account login.

§

UsageRefreshFailed

-32082 — a usage/refresh whose mint failed.

Implementations§

Source§

impl ErrorCode

Source

pub const ALL: [Self; 51]

Every code enrolled in the public bundle, in registry order: the 37 stable rows plus 14 experimental rows (5 raw-log, 1 workspace-trust, 1 limits, 1 draining-daemon refusal, 3 admission, 3 usage-refresh), which render only in the experimental bundle.

Source

pub const fn code(self) -> i64

The wire integer.

Source

pub const fn kind(self) -> ErrorKind

The primary data.kind for this code.

Source

pub const fn override_kinds(self) -> &'static [ErrorKind]

Kinds that override the primary on this code: handshake-ordering overrides on -32600, the experimental gate on -32601/-32602, the permanent page/output budget residuals on -32603, and the unusable/absent boundary arms on -32042.

Source

pub const fn retryable(self) -> Option<bool>

Whether a retry can succeed. None for the pre-emption codes, where retry is not applicable — the outcome arrives on the view stream.

Source

pub const fn is_experimental(self) -> bool

Whether this row renders only in the experimental bundle.

Trait Implementations§

Source§

impl Clone for ErrorCode

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ErrorCode

Source§

impl Debug for ErrorCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ErrorCode

Source§

impl PartialEq for ErrorCode

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ErrorCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.