pub struct JsonRpcError {
pub code: i64,
pub message: String,
pub data: Option<Value>,
}Expand description
The error member of a failed JsonRpcResponse.
Protocol-level failure (unknown method, bad params, panic). A tool
that fails still returns a successful response carrying a
ToolCallResult with is_error: true — that distinction is MCP’s,
not ours: the model sees tool errors, the client sees protocol ones.
Fields§
§code: i64Numeric error code; see METHOD_NOT_FOUND, INVALID_PARAMS,
INTERNAL_ERROR.
message: StringHuman-readable description of what went wrong.
data: Option<Value>Optional structured detail; this server never sets it.
Trait Implementations§
Source§impl Debug for JsonRpcError
impl Debug for JsonRpcError
Auto Trait Implementations§
impl Freeze for JsonRpcError
impl RefUnwindSafe for JsonRpcError
impl Send for JsonRpcError
impl Sync for JsonRpcError
impl Unpin for JsonRpcError
impl UnsafeUnpin for JsonRpcError
impl UnwindSafe for JsonRpcError
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