#[non_exhaustive]pub enum ErrorKind {
Show 25 variants
ToolNotFound,
ToolExecutionFailed,
PromptNotFound,
ResourceNotFound,
ResourceAccessDenied,
CapabilityNotSupported,
ProtocolVersionMismatch,
UserRejected,
ParseError,
InvalidRequest,
MethodNotFound,
InvalidParams,
Internal,
Authentication,
PermissionDenied,
Transport,
Timeout,
Unavailable,
RateLimited,
ServerOverloaded,
Configuration,
ExternalService,
Cancelled,
Security,
Serialization,
}Expand description
Error classification for programmatic handling.
This enum is #[non_exhaustive] — new variants may be added in future
minor releases without a breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ToolNotFound
Tool not found (MCP -32001)
ToolExecutionFailed
Tool execution failed (MCP -32002)
PromptNotFound
Prompt not found (MCP -32003)
ResourceNotFound
Resource not found (MCP -32004)
ResourceAccessDenied
Resource access denied (MCP -32005)
CapabilityNotSupported
Capability not supported (MCP -32006)
ProtocolVersionMismatch
Protocol version mismatch (MCP -32007)
UserRejected
User rejected the request (MCP -1)
ParseError
Parse error (-32700)
InvalidRequest
Invalid request (-32600)
MethodNotFound
Method not found (-32601)
InvalidParams
Invalid params (-32602)
Internal
Internal error (-32603)
Authentication
Authentication failed
PermissionDenied
Permission denied
Transport
Transport/network error
Timeout
Operation timed out
Service unavailable
RateLimited
Rate limited (-32009)
ServerOverloaded
Server overloaded (-32010)
Configuration
Configuration error
ExternalService
External service failed
Cancelled
Operation cancelled
Security
Security violation
Serialization
Serialization error
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ErrorKind
impl<'de> Deserialize<'de> for ErrorKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ErrorKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ErrorKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for ErrorKind
impl Serialize for ErrorKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for ErrorKind
impl Eq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
impl UnwindSafe for ErrorKind
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,
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.