Skip to main content

ErrorKind

Enum ErrorKind 

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

A stable error.data.kind category: camelCase, the value clients branch on. Open: new kinds are added as their methods land, and a new kind is additive only because this domain is declared open.

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

Line was not valid JSON (-32700); id is null.

§

InvalidRequest

Valid JSON, invalid frame (-32600).

§

NotInitialized

Pre-handshake request other than initialize (-32600 override).

§

AlreadyInitialized

Second initialize on one connection (-32600 override).

§

MethodNotFound

Unknown method (-32601).

§

InvalidParams

Malformed params (-32602).

§

ExperimentalRequired

Experimental method, field, or variant without the experimentalApi opt-in.

§

Internal

Unexpected server failure (-32603).

§

PageEventTooLarge

One durable view event cannot fit the configured page-result budget (-32603 override); sessionId, viewCursor, and limitBytes name the blocked range and budget.

§

OutputResultTooLarge

A bounded item/readOutput result cannot fit the configured result budget even at zero progress (-32603 override); sessionId and limitBytes name the session and exceeded budget.

§

Overloaded

Ingress queue saturated (-32001); retry with backoff and jitter.

§

InputTooLarge

Frame or params over the limit (-32002); data.limitBytes present.

§

CapabilityRequired

Capability-gated method without the grant (-32010); data.capability names it.

§

NotFound

Run, item, subscription, or cursor anchor missing (-32011); a missing view-cursor anchor sets data.reason: "missingAnchor".

§

Interrupted

Interrupt pre-empted the request (-32013); outcome on the view.

§

Cancelled

Cancellation pre-empted the request (-32014); outcome on the view.

§

SessionNotFound

sessionId resolves to no session on this host; data.sessionId names the rejected id.

§

SessionInUse

The session writer lease is held by another host (-32021).

§

SessionAmbiguous

More than one canonical retained log matches the session (-32022).

§

ForkBoundaryInvalid

A fork cut names an unknown or non-terminal turn (-32023).

§

SessionNotLoaded

Session exists but is not loaded on this host; data.sessionId names the unloaded session.

§

SessionStreamMismatch

The resolved store’s own stream id is not the requested session: a moved or renamed session directory whose log belongs to a different session. data.sessionId names the requested session.

§

LimitsAboveMax

A session/start choice is wider than the host ceiling on at least one axis; data.axes names every too-wide axis with its requested and ceiling values and data.retryable is false. Experimental tier with the socket limits surface.

§

WorkspaceNotTrusted

A worktree action names an untrusted repository; data.path names the subject repo and data.retryable is false. Experimental tier with the worktree surface.

§

CommandRejected

An command id was replayed with a different payload (-32030).

§

Backpressured

The bounded command-admission queue is full (-32031).

§

SkillNotFound

A skill selector names no skill in the session’s current user-invocable catalog; data.sessionId and data.selector name the rejected pair.

§

ComputerUseUnavailable

Computer use is unavailable on this host: its gate was off when the host launched, or the host is not macOS. The computerUseSettings/* methods stay registered and answer this.

§

MarketplaceNotFound

A plugin verb names no configured marketplace; data.sessionId and data.name name the rejected pair.

§

PluginNotFound

The install arm names no plugin in the named store; data.sessionId, data.marketplace, and data.name name the rejected triple.

§

MarketplaceAlreadyExists

Marketplace add over an already-configured name; the existing record is untouched. data.sessionId and data.name name the rejected pair.

§

PluginMutationsDisabled

The managed policy disables plugin mutation; nothing was touched. data.sessionId names the acting session.

§

UploadNotFound

A video input part names an upload id with no completed upload; data.sessionId and data.uploadId name the rejected pair.

§

ViewTruncated

The requested range predates the retained view; data.earliestCursor names the oldest servable position when one exists. Recovery is session/resume snapshot semantics.

§

OutputUnavailable

An item/readOutput ref exists but its bytes are not servable; data.availability carries the durable ToolOutputAvailability, read-time-derived ("unsupported"/"accessFailed") when the durable record still says available.

§

BoundaryPruned

A requested installed boundary has been pruned.

§

BoundaryUnusable

The installed boundary cannot safely serve the requested read (-32042 override).

§

NoBoundary

No installed boundary exists for the requested read (-32042 override).

§

ApprovalNotFound

Approval id is unknown (-32050).

§

ApprovalAlreadyResolved

Approval already has a durable terminal (-32051).

§

ApprovalChoiceInvalid

Choice or feedback is invalid for this approval (-32052).

§

ApprovalRequirementStale

Requirement token is not the current stage (-32053).

§

ApprovalReviewerUnavailable

A protected write has no live reviewer lease (-32054).

§

UserInputNotFound

User-input prompt id is unknown (-32055).

§

UserInputAlreadySettled

User-input prompt already has a durable settlement (-32056).

§

UserInputAnswerInvalid

Structured answer or clarification is invalid (-32057).

§

MissingAnchor

A raw-log cursor position names no position of the requested stream; data.stream and data.after name the rejected anchor. Experimental tier.

§

PrunedPrefix

A raw-log anchor (or the origin) falls in a retention-pruned prefix; data.nextAvailable carries the earliest readable position. Experimental tier.

§

WrongStream

A raw-log anchor id exists in the session but belongs to a different stream. Experimental tier.

§

UnknownStream

No such stream in the session. Experimental tier.

§

UnknownProjection

No such registered projection. Experimental tier.

§

AdmissionNotFound

Admission id is unknown; data.sessionId and data.admissionId name the rejected pair. Experimental tier.

§

AdmissionAlreadyResolved

Decide after the durable terminal; data.admissionId plus the winning data.admissionResolution, data.retryable: false. Experimental tier.

§

AdmissionChoiceInvalid

Choice is not among the current availableChoices; data.admissionId and data.choiceId name the rejected pair. Experimental tier.

§

UsageRefreshRateLimited

A usage/refresh inside the per-host window; data.retryAfterMs is the time left, data.retryable: true. Experimental tier.

§

UsageRefreshUnavailable

A usage/refresh on a host with no Meta-account login to mint with. Experimental tier.

§

UsageRefreshFailed

A usage/refresh whose mint failed; data.failureKind names the class. Experimental tier.

§

Unrecognized

A value from a newer host. The rest of the message still decodes, but the word is not kept, and encoding this variant fails. Never construct it.

Trait Implementations§

Source§

impl Clone for ErrorKind

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 ErrorKind

Source§

impl Debug for ErrorKind

Source§

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

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

impl<'de> Deserialize<'de> for ErrorKind

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for ErrorKind

Source§

impl PartialEq for ErrorKind

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 Serialize for ErrorKind

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ErrorKind

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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.