pub enum McpError {
Config(McpConfigError),
UntrustedProjectServer {
name: String,
path: PathBuf,
},
NeedsAuth {
www_authenticate: Option<String>,
status: u16,
},
HttpStatus {
status: u16,
body: String,
},
Rpc {
code: i64,
message: String,
data: Option<Value>,
},
Protocol(String),
Timeout {
operation: String,
timeout: Duration,
},
Transport {
message: String,
stderr: Option<String>,
},
Io(Error),
}Expand description
Errors returned by MCP transports and client operations.
Variants§
Config(McpConfigError)
UntrustedProjectServer
NeedsAuth
HttpStatus
Rpc
Protocol(String)
Timeout
Transport
Io(Error)
Trait Implementations§
Source§impl Error for McpError
impl Error for McpError
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()
Source§impl From<McpConfigError> for McpError
impl From<McpConfigError> for McpError
Source§fn from(err: McpConfigError) -> Self
fn from(err: McpConfigError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for McpError
impl !UnwindSafe for McpError
impl Forget for McpError
impl Freeze for McpErrorwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const () is !null: Freeze,
PhantomData<ErrorData<CustomOwner>>: Freeze,
PhantomData<Value>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, Value>>: Freeze,
impl Move for McpError
impl Send for McpError
impl Sync for McpError
impl Unpin for McpError
impl UnsafeUnpin for McpErrorwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const () is !null: UnsafeUnpin,
PhantomData<ErrorData<CustomOwner>>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, Value>>: UnsafeUnpin,
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