Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

feat: Minor log update to quote and print filename in error messages (#643)

Chandrasekharan Mf22e1c4470f0
diff --git a/backend/workflow_manager/workflow/execution.py b/backend/workflow_manager/workflow/execution.py
index c388c71c4..3de3bec0a 100644
--- a/backend/workflow_manager/workflow/execution.py
+++ b/backend/workflow_manager/workflow/execution.py
@@ -277,7 +277,7 @@ class WorkflowExecutionServiceHelper(WorkflowExecutionService):
)
self.publish_log(
f"Total files: {total_files}, "
- f"{successful_files} successfully executed and {failed_files} errors"
+ f"{successful_files} successfully executed and {failed_files} error(s)"
)
def publish_initial_tool_execution_logs(
diff --git a/backend/workflow_manager/workflow/workflow_helper.py b/backend/workflow_manager/workflow/workflow_helper.py
index 0a8561744..7f9890945 100644
--- a/backend/workflow_manager/workflow/workflow_helper.py
+++ b/backend/workflow_manager/workflow/workflow_helper.py
@@ -201,7 +201,7 @@ class WorkflowHelper:
except StopExecution:
raise
except Exception as e:
- error = f"Error processing file {input_file}: {str(e)}"
+ error = f"Error processing file '{os.path.basename(input_file)}'. {str(e)}"
execution_service.publish_log(error, level=LogLevel.ERROR)
execution_service.publish_update_log(
LogState.RUNNING,
diff --git a/backend/workflow_manager/workflow_v2/workflow_helper.py b/backend/workflow_manager/workflow_v2/workflow_helper.py
index 89b4babf0..9a371051b 100644
--- a/backend/workflow_manager/workflow_v2/workflow_helper.py
+++ b/backend/workflow_manager/workflow_v2/workflow_helper.py
@@ -190,7 +190,7 @@ class WorkflowHelper:
raise
except Exception as e:
execution_service.publish_log(
- f"Error processing file {input_file}: {str(e)}",
+ f"'Error processing file '{os.path.basename(input_file)}'. {str(e)}",
level=LogLevel.ERROR,
)
error = str(e)