fix(mcp): propagate internal serialization errors instead of silently swallowing them to prevent LLM hallucination

This commit is contained in:
Riz Ashraf committed 2026-09-27 22:19:43 +01:00
1 parent f8925050db
commit 8f32a09399
13 files changed
+235 -63

No files matched your search

+1 -1
View File
@@ -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())
}
}