feat: unified error type (#308)

* feat: unified error type

* fix: use type id to compare transport type
This commit is contained in:
4t145 2025-07-09 11:23:39 +08:00 • committed by GitHub
commit e615300fea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,7 +19,7 @@
//!
//! ```rust
//! use std::sync::Arc;
//! use rmcp::{Error as McpError, model::*, tool, tool_router, handler::server::tool::ToolRouter};
//! use rmcp::{ErrorData as McpError, model::*, tool, tool_router, handler::server::tool::ToolRouter};
//! use tokio::sync::Mutex;
//!
//! #[derive(Clone)]
@ -90,7 +90,8 @@
//! }
//! ```
mod error;
pub use error::Error;
#[allow(deprecated)]
pub use error::{Error, ErrorData, RmcpError};
/// Basic data types in MCP specification
pub mod model;