Skip to main content

ErrorData

Struct ErrorData 

Source
#[non_exhaustive]
pub struct ErrorData {
Show 44 fields pub kind: ErrorKind, pub retryable: Option<bool>, pub descriptor: Option<String>, pub capability: Option<CapabilityName>, pub command_id: Option<String>, pub reason: Option<String>, pub limit_bytes: Option<u64>, pub view_cursor: Option<String>, pub item_id: Option<String>, pub output_ref: Option<String>, pub availability: Option<String>, pub aligned_next_offset: Option<u64>, pub capacity: Option<u64>, pub details: Option<Map<String, Value>>, pub session_id: Option<String>, pub recovery_observation: Option<RecoveryObservation>, pub selector: Option<String>, pub name: Option<String>, pub marketplace: Option<String>, pub upload_id: Option<String>, pub earliest_cursor: Option<Option<String>>, pub anchor: Option<Option<String>>, pub latest_boundary_cursor: Option<Option<String>>, pub last_turn_id: Option<String>, pub seed_path: Option<String>, pub seed_fallback_reason: Option<String>, pub paths: Option<Vec<String>>, pub approval_id: Option<String>, pub resolution: Option<ApprovalResolutionSummary>, pub current_requirement_id: Option<ApprovalRequirementRef>, pub choice_id: Option<String>, pub user_input_id: Option<String>, pub settlement: Option<UserInputSettlementSummary>, pub admission_id: Option<String>, pub admission_resolution: Option<AdmissionResolutionSummary>, pub stream: Option<StreamRef>, pub after: Option<RecordPosition>, pub next_available: Option<RecordPosition>, pub requested_stream: Option<StreamRef>, pub cursor_stream: Option<StreamRef>, pub projection: Option<String>, pub path: Option<String>, pub key_path: Option<String>, pub index: Option<u64>,
}
Expand description

The optional error.data object. All members additive-optional; kind is always present when data is.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§kind: ErrorKind

The stable camelCase category clients branch on.

§retryable: Option<bool>

Whether retrying can succeed (e.g. overloaded). When present, overrides the error table row’s retryable default for this code.

§descriptor: Option<String>

the protocol spec descriptor, on experimentalRequired errors.

§capability: Option<CapabilityName>

The missing capability, on capabilityRequired errors. Typed on the grantable registry, so rawLog is outside the v1 domain and joins it as an additive open-enum extension when the protocol spec un-defers.

§command_id: Option<String>

The rejected command’s identifier, on commandRejected errors. The ratified v1 contract pairs it with reason, so a client can settle the exact command it sent without parsing the message string.

§reason: Option<String>

Failure detail vocabulary (e.g. "missingAnchor" on notFound for a missing view-cursor anchor).

§limit_bytes: Option<u64>

The exceeded byte limit, on inputTooLarge errors.

§view_cursor: Option<String>

The blocked view position on pageEventTooLarge errors.

§item_id: Option<String>

The item whose stored output was requested, on the item/readOutput arms (notFound, outputUnavailable, and the misaligned-offset invalidParams).

§output_ref: Option<String>

The requested outputRef.id, on the same item/readOutput arms.

§availability: Option<String>

The stored output’s availability on outputUnavailable — the durable ToolOutputAvailability value, read-time-derived when the durable record still says available.

§aligned_next_offset: Option<u64>

The next provable UTF-8 boundary on a misaligned text-media item/readOutput read: absent when no boundary is provable from the stored bytes ahead.

§capacity: Option<u64>

The configured command-admission bound, on backpressured errors.

§details: Option<Map<String, Value>>

Free-form additive detail.

§session_id: Option<String>

Session identity on errors whose lookup is session-scoped.

§recovery_observation: Option<RecoveryObservation>

The original recovery-dependent construction’s coherent observation. An absent or unusable observation establishes no supported recovery.

§selector: Option<String>

The rejected skill selector on skillNotFound.

§name: Option<String>

The rejected marketplace name on marketplaceNotFound and marketplaceAlreadyExists; the rejected plugin name on pluginNotFound.

§marketplace: Option<String>

The store on pluginNotFound.

§upload_id: Option<String>

The rejected upload id on uploadNotFound.

§earliest_cursor: Option<Option<String>>

The oldest servable view position on viewTruncated; served as an explicit null when nothing before the head is servable — the null is present on the wire, never a dropped key.

§anchor: Option<Option<String>>

The rejected anchor value on notFound/missingAnchor and the -32042 boundary arms; on -32042 it is served as an explicit null when the request named no concrete anchor.

§latest_boundary_cursor: Option<Option<String>>

The latest installed boundary’s view cursor on the -32042 arms — always present in the -32042 JSON and explicitly null when no boundary exists.

§last_turn_id: Option<String>

Rejected inclusive fork boundary on forkBoundaryInvalid.

§seed_path: Option<String>

The branch-seed path the host read before rejecting, on branch-validation rejections: one of runtime_checkpoint_tail, runtime_full_replay, legacy_session_data — the durable branch-seed vocabulary, so the client cites the real seed decision instead of guessing at a stale binary.

§seed_fallback_reason: Option<String>

Why the branch seed did not use a checkpoint, on the same arms: one of no_usable_checkpoint, unsupported_checkpoint_shape, checkpoint_has_model_visible_tail, checkpoint_missing_suffix; absent when the seed used a checkpoint or no fallback was recorded.

§paths: Option<Vec<String>>

Candidate retained paths on sessionAmbiguous.

§approval_id: Option<String>

Approval identity on the protocol spec errors.

§resolution: Option<ApprovalResolutionSummary>

Winning resolution on approvalAlreadyResolved.

§current_requirement_id: Option<ApprovalRequirementRef>

Current stage token on approvalRequirementStale.

§choice_id: Option<String>

Rejected server-minted choice on approvalChoiceInvalid.

§user_input_id: Option<String>

User-input prompt identity on the protocol spec errors.

§settlement: Option<UserInputSettlementSummary>

Winning settlement on userInputAlreadySettled.

§admission_id: Option<String>

Admission identity on admission errors.

§admission_resolution: Option<AdmissionResolutionSummary>

Winning resolution on admissionAlreadyResolved.

§stream: Option<StreamRef>

The rejected raw-log stream, on the anchor arms (missingAnchor, prunedPrefix, unknownStream).

§after: Option<RecordPosition>

The rejected raw-log anchor, on missingAnchor, prunedPrefix, and wrongStream.

§next_available: Option<RecordPosition>

The earliest readable position, on prunedPrefix.

§requested_stream: Option<StreamRef>

The requested stream, on wrongStream.

§cursor_stream: Option<StreamRef>

The stream the anchor’s id actually belongs to, on wrongStream.

§projection: Option<String>

The unregistered projection name, on unknownProjection.

§path: Option<String>

The subject repository path, on workspaceNotTrusted.

§key_path: Option<String>

The rejected settings key path, on the settings/writeValue and settings/writeMany arms: the structural -32602 invalidParams shape and the -32030 managed-denial block. File spelling verbatim, like the request’s keyPath.

§index: Option<u64>

The rejected edit’s index into the settings/writeMany edits array, on the same arms; absent on settings/writeValue, which carries no edit list.

Implementations§

Source§

impl ErrorData

Source

pub const fn new(kind: ErrorKind) -> Self

A kind-only payload with every optional field None — the one constructor call sites extend with struct-update syntax, so an additive SS field touches this file alone, never every literal.

Trait Implementations§

Source§

impl Clone for ErrorData

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 Debug for ErrorData

Source§

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

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

impl<'de> Deserialize<'de> for ErrorData

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 PartialEq for ErrorData

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 ErrorData

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 ErrorData

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.