#[non_exhaustive]pub enum ErrorCode {
ParseError,
InvalidRequest,
MethodNotFound,
InvalidParams,
InternalError,
RequestCancelled,
AuthRequired,
ResourceNotFound,
UrlElicitationRequired,
Other(i32),
}Expand description
Predefined error codes for common JSON-RPC and ACP-specific errors.
These codes follow the JSON-RPC 2.0 specification for standard errors and use the reserved range (-32000 to -32099) for protocol-specific errors.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ParseError
Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.
InvalidRequest
The JSON sent is not a valid Request object.
MethodNotFound
The method does not exist or is not available.
InvalidParams
Invalid method parameter(s).
InternalError
Internal JSON-RPC error. Reserved for implementation-defined server errors.
RequestCancelled
unstable_cancel_request only.UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Execution of the method was aborted either due to a cancellation request from the caller or because of resource constraints or shutdown.
AuthRequired
Authentication is required before this operation can be performed.
ResourceNotFound
A given resource, such as a file, was not found.
UrlElicitationRequired
unstable_elicitation only.UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
The agent requires user input via a URL-based elicitation before it can proceed.
Other(i32)
Other undefined error code.
Trait Implementations§
impl Copy for ErrorCode
Source§impl<'de> Deserialize<'de> for ErrorCode
impl<'de> Deserialize<'de> for ErrorCode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ErrorCode
Source§impl JsonSchema for ErrorCode
impl JsonSchema for ErrorCode
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnsafeUnpin for ErrorCode
impl UnwindSafe for ErrorCode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.