pub struct HeaderMismatchError {
pub error: RpcError,
pub id: Option<RequestId>,
/* private fields */
}Expand description
Latest MCP Protocol 2026_07_28 Returned when a server rejects a request because the values in the HTTP headers do not match the corresponding values in the request body, or because required headers are missing or malformed. For HTTP, the response status code MUST be 400 Bad Request.
JSON schema
{
"description": "Returned when a server rejects a request because the values in the HTTP\nheaders do not match the corresponding values in the request body, or\nbecause required headers are missing or malformed. For HTTP, the response\nstatus code MUST be 400 Bad Request.",
"type": "object",
"required": [
"error",
"jsonrpc"
],
"properties": {
"error": {
"allOf": [
{
"$ref": "#/$defs/Error"
},
{
"type": "object",
"required": [
"code"
],
"properties": {
"code": {
"type": "integer"
}
}
}
]
},
"id": {
"$ref": "#/$defs/RequestId"
},
"jsonrpc": {
"type": "string",
"const": "2.0"
}
}
}Fields§
§error: RpcError§id: Option<RequestId>Implementations§
Trait Implementations§
Source§impl Clone for HeaderMismatchError
impl Clone for HeaderMismatchError
Source§fn clone(&self) -> HeaderMismatchError
fn clone(&self) -> HeaderMismatchError
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 HeaderMismatchError
impl Debug for HeaderMismatchError
Source§impl<'de> Deserialize<'de> for HeaderMismatchError
impl<'de> Deserialize<'de> for HeaderMismatchError
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 HeaderMismatchError
impl RefUnwindSafe for HeaderMismatchError
impl Send for HeaderMismatchError
impl Sync for HeaderMismatchError
impl Unpin for HeaderMismatchError
impl UnsafeUnpin for HeaderMismatchError
impl UnwindSafe for HeaderMismatchError
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