From 6ffa2ebabf353c89c17abe2c0f92921046d728aa Mon Sep 17 00:00:00 2001 From: -LAN- Date: Tue, 9 Sep 2025 22:16:42 +0800 Subject: [PATCH] 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 --- api/core/workflow/graph/graph.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/core/workflow/graph/graph.py b/api/core/workflow/graph/graph.py index dc38d4d2a3..8654ad4ef5 100644 --- a/api/core/workflow/graph/graph.py +++ b/api/core/workflow/graph/graph.py @@ -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