feat: improve error handling in graph node creation

- Replace ValueError catch with generic Exception
- Use logger.exception for automatic traceback logging
- Abort on node creation failure instead of continuing
This commit is contained in:
-LAN- 2025-09-09 22:16:42 +08:00
parent 95dc1e2fe8
commit 6ffa2ebabf
No known key found for this signature in database
GPG Key ID: 6BA0D108DED011FF
1 changed files with 3 additions and 3 deletions

View File

@ -188,9 +188,9 @@ class Graph:
for node_id, node_config in node_configs_map.items():
try:
node_instance = node_factory.create_node(node_config)
except ValueError as e:
logger.warning("Failed to create node instance: %s", str(e))
continue
except Exception:
logger.exception("Failed to create node instance for node_id %s", node_id)
raise
nodes[node_id] = node_instance
return nodes