synwire_core/error/
tool.rs1#[derive(Debug, thiserror::Error)]
5#[non_exhaustive]
6pub enum ToolError {
7 #[error("tool invocation failed: {message}")]
9 InvocationFailed {
10 message: String,
12 },
13 #[error("tool input validation failed: {message}")]
15 ValidationFailed {
16 message: String,
18 },
19 #[error("tool not found: {name}")]
21 NotFound {
22 name: String,
24 },
25 #[error("invalid tool name '{name}': {reason}")]
27 InvalidName {
28 name: String,
30 reason: String,
32 },
33 #[error("path traversal detected: {path}")]
35 PathTraversal {
36 path: String,
38 },
39 #[error("tool execution timed out")]
41 Timeout,
42 #[error("tool error: {message}")]
44 Other {
45 message: String,
47 },
48}