fix: restore AppError::Internal for AST parser error, keeping BadRequest for JSON schema validation
This commit is contained in:
1 parent
39528411f4
commit
de060c4db4
10 files changed
+57
-57
No files matched your search
@@ -700,7 +700,7 @@ impl McpTool for ClipboardHandler {
|
||||
}
|
||||
|
||||
async fn execute(&self, args: Value, state: Arc<MemoryState>) -> crate::error::Result<String> {
|
||||
let req: ClipboardTool = serde_json::from_value(args).map_err(|e| e.to_string())?;
|
||||
let req: ClipboardTool = serde_json::from_value(args).map_err(|e| crate::error::AppError::BadRequest(format!("Schema validation failed. Your JSON arguments do not match the expected tool schema: {}", e)))?;
|
||||
match req.action {
|
||||
ClipboardAction::Image => {
|
||||
let cached_opt = {
|
||||
|
||||
Reference in new issue
Block a user