fix(mcp): propagate internal serialization errors instead of silently swallowing them to prevent LLM hallucination
This commit is contained in:
1 parent
f8925050db
commit
8f32a09399
13 files changed
+235
-63
No files matched your search
@@ -684,7 +684,7 @@ async fn execute_nvim_lua_with_args(code: &str, args: Vec<rmpv::Value>) -> Resul
|
||||
if let serde_json::Value::String(s) = json_res {
|
||||
Ok(s)
|
||||
} else {
|
||||
Ok(serde_json::to_string_pretty(&json_res).unwrap_or_default())
|
||||
serde_json::to_string_pretty(&json_res).map_err(|e| e.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user