fix(mcp): prevent internal handler serialization errors from being silently discarded or defaulting to empty strings

This commit is contained in:
Riz Ashraf committed 2026-09-27 22:30:32 +01:00
1 parent 8f32a09399
commit febd48c65d
5 files changed
+12 -12

No files matched your search

+1 -1
View File
@@ -28,7 +28,7 @@ impl<T: DeserializeOwned + Default + Serialize + Clone + Send + Sync + 'static>
let key_inner = key_clone.clone();
let json_data = {
let lock = cache_clone.read().unwrap_or_else(|e| e.into_inner());
serde_json::to_vec(&*lock).ok()
serde_json::to_vec(&*lock).map_err(|e| tracing::error!("Failed to serialize memory store: {}", e)).ok()
};
if let Some(json_data) = json_data {