mirror of https://github.com/langgenius/dify.git
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:
parent
95dc1e2fe8
commit
6ffa2ebabf
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue