meerkat_tools/error.rs
1//! Tool error types for Meerkat.
2
3pub use meerkat_core::error::{ToolError, ToolValidationError};
4use thiserror::Error;
5
6/// Errors that can occur during tool dispatch
7#[derive(Debug, Error)]
8pub enum DispatchError {
9 #[error("Validation error: {0}")]
10 Validation(#[from] ToolValidationError),
11 #[error("Tool error: {0}")]
12 Tool(#[from] ToolError),
13 #[error("MCP error: {0}")]
14 #[cfg(feature = "mcp")]
15 Mcp(#[from] meerkat_mcp::McpError),
16 #[error("Timeout: tool execution took longer than {timeout_ms}ms")]
17 Timeout { timeout_ms: u64 },
18}