pub enum HttpError {
Connect(Error),
Http(Error),
Status(u16, Vec<u8>),
Unsupported(String),
NoResponse,
}Expand description
An MCP transport error (connect / HTTP / protocol).
Variants§
Connect(Error)
Http(Error)
Status(u16, Vec<u8>)
A non-2xx HTTP status, with the (capped) response body — carried so the
caller can classify a modern JSON-RPC error (era detection, -32022
version retry) from the body rather than just the status code.
Unsupported(String)
The build lacks the feature this endpoint needs (e.g. vsock).
NoResponse
No JSON-RPC response matched the request id before the stream ended.
Trait Implementations§
Source§impl Error for HttpError
impl Error for HttpError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for HttpError
impl !UnwindSafe for HttpError
impl Freeze for HttpError
impl Send for HttpError
impl Sync for HttpError
impl Unpin for HttpError
impl UnsafeUnpin for HttpError
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