mirror of
https://github.com/langgenius/dify.git
synced 2026-04-22 03:37:44 +08:00
record inputs and process data when node failed
This commit is contained in:
@ -55,7 +55,9 @@ class BaseWorkflowCallback(ABC):
|
||||
def on_workflow_node_execute_failed(self, node_id: str,
|
||||
node_type: NodeType,
|
||||
node_data: BaseNodeData,
|
||||
error: str) -> None:
|
||||
error: str,
|
||||
inputs: Optional[dict] = None,
|
||||
process_data: Optional[dict] = None) -> None:
|
||||
"""
|
||||
Workflow node execute failed
|
||||
"""
|
||||
|
||||
@ -420,7 +420,9 @@ class WorkflowEngineManager:
|
||||
node_id=node.node_id,
|
||||
node_type=node.node_type,
|
||||
node_data=node.node_data,
|
||||
error=node_run_result.error
|
||||
error=node_run_result.error,
|
||||
inputs=node_run_result.inputs,
|
||||
process_data=node_run_result.process_data,
|
||||
)
|
||||
|
||||
raise ValueError(f"Node {node.node_data.title} run failed: {node_run_result.error}")
|
||||
|
||||
Reference in New Issue
Block a user