fix(workflow): rectify error handling and bolster execution logging
- Rectify exception propagation during node execution failures to ensure errors are correctly raised. - Bolster workflow logging to support failed status records and persist node execution data, including loop nodes.
This commit is contained in:
@@ -447,6 +447,19 @@ class BaseNode(ABC):
|
||||
"error": error_message
|
||||
}
|
||||
|
||||
# if error_edge:
|
||||
# # If an error edge exists, log a warning and continue to error node
|
||||
# logger.warning(
|
||||
# f"Node {self.node_id} execution failed, redirecting to error node: {error_edge['target']}"
|
||||
# )
|
||||
# return {
|
||||
# "node_outputs": {
|
||||
# self.node_id: node_output
|
||||
# },
|
||||
# "error": error_message,
|
||||
# "error_node": self.node_id
|
||||
# }
|
||||
# else:
|
||||
writer = get_stream_writer()
|
||||
writer({
|
||||
"type": "node_error",
|
||||
|
||||
Reference in New Issue
Block a user