pub struct InvalidRequestError {
pub code: i64,
pub data: Option<Value>,
pub message: String,
}Expand description
Latest MCP Protocol 2026_07_28 A JSON-RPC error indicating that the request is not a valid request object. This error is returned when the message structure does not conform to the JSON-RPC 2.0 specification requirements for a request (e.g., missing required fields like jsonrpc or method, or using invalid types for these fields).
JSON schema
{
"description": "A JSON-RPC error indicating that the request is not a valid request object. This error is returned when the message structure does not conform to the JSON-RPC 2.0 specification requirements for a request (e.g., missing required fields like jsonrpc or method, or using invalid types for these fields).",
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"description": "The error type that occurred.",
"type": "integer",
"const": -32600
},
"data": {
"description": "Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.)."
},
"message": {
"description": "A short description of the error. The message SHOULD be limited to a concise single sentence.",
"type": "string"
}
}
}Fields§
§code: i64The error type that occurred.
data: Option<Value>Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
message: StringA short description of the error. The message SHOULD be limited to a concise single sentence.
Trait Implementations§
Source§impl Clone for InvalidRequestError
impl Clone for InvalidRequestError
Source§fn clone(&self) -> InvalidRequestError
fn clone(&self) -> InvalidRequestError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 InvalidRequestError
impl Debug for InvalidRequestError
Source§impl<'de> Deserialize<'de> for InvalidRequestError
impl<'de> Deserialize<'de> for InvalidRequestError
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
Auto Trait Implementations§
impl Freeze for InvalidRequestError
impl RefUnwindSafe for InvalidRequestError
impl Send for InvalidRequestError
impl Sync for InvalidRequestError
impl Unpin for InvalidRequestError
impl UnsafeUnpin for InvalidRequestError
impl UnwindSafe for InvalidRequestError
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