Skip to content

Graph-Native Infrastructure for Context and Accountable AI Systems

Potential fix for pull request finding 'Empty except'

Mohd Kaife4425818e435
diff --git a/mcp/tools/export.py b/mcp/tools/export.py
index d2ea1733..fc7d9cc7 100644
--- a/mcp/tools/export.py
+++ b/mcp/tools/export.py
@@ -34,8 +34,8 @@ def handle_export_graph(args: dict) -> dict:
if hasattr(graph, "find_edges"):
try:
edges = list(graph.find_edges())
- except Exception:
- pass
+ except Exception as exc:
+ log.debug("Failed to collect edges during JSON export; continuing with empty edges: %s", exc)
payload: dict = {"nodes": nodes, "edges": edges}
if include_metadata:
payload["meta"] = {