pub enum McpErrorCode {
ParseError,
InvalidRequest,
MethodNotFound,
InvalidParams,
InternalError,
ToolExecutionError,
ResourceNotFound,
ResourceForbidden,
PromptNotFound,
RequestCancelled,
Custom(i32),
}Expand description
Standard MCP/JSON-RPC error codes.
These follow the JSON-RPC 2.0 specification and MCP protocol.
Variants§
ParseError
Invalid JSON was received.
InvalidRequest
The JSON sent is not a valid Request object.
MethodNotFound
The method does not exist or is not available.
InvalidParams
Invalid method parameters.
InternalError
Internal JSON-RPC error.
ToolExecutionError
Tool execution failed.
ResourceNotFound
Resource not found.
ResourceForbidden
Resource access forbidden.
PromptNotFound
Prompt not found.
RequestCancelled
Request was cancelled.
Custom(i32)
Custom error code (server-defined).
Trait Implementations§
Source§impl Clone for McpErrorCode
impl Clone for McpErrorCode
Source§fn clone(&self) -> McpErrorCode
fn clone(&self) -> McpErrorCode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for McpErrorCode
impl Debug for McpErrorCode
Source§impl<'de> Deserialize<'de> for McpErrorCode
impl<'de> Deserialize<'de> for McpErrorCode
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<McpErrorCode> for i32
impl From<McpErrorCode> for i32
Source§fn from(code: McpErrorCode) -> Self
fn from(code: McpErrorCode) -> Self
Converts to this type from the input type.
Source§impl From<i32> for McpErrorCode
impl From<i32> for McpErrorCode
Source§impl PartialEq for McpErrorCode
impl PartialEq for McpErrorCode
Source§impl Serialize for McpErrorCode
impl Serialize for McpErrorCode
impl Copy for McpErrorCode
impl Eq for McpErrorCode
impl StructuralPartialEq for McpErrorCode
Auto Trait Implementations§
impl Freeze for McpErrorCode
impl RefUnwindSafe for McpErrorCode
impl Send for McpErrorCode
impl Sync for McpErrorCode
impl Unpin for McpErrorCode
impl UnwindSafe for McpErrorCode
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).