From 69834ac4acd09ea571fc2ad17353664799cb2ee9 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 4 Sep 2025 18:32:38 -0300 Subject: [PATCH] Refactor error logging in upload_user_file function This commit replaces the print statement for error traceback with a structured logging approach using the logger. This change enhances error visibility and aligns with best practices for robust and well-documented async code. --- src/api/langflow_files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/langflow_files.py b/src/api/langflow_files.py index f51d2c17..1fa1f9c7 100644 --- a/src/api/langflow_files.py +++ b/src/api/langflow_files.py @@ -47,7 +47,7 @@ async def upload_user_file( ) import traceback - print(f"[ERROR] Traceback: {traceback.format_exc()}") + logger.error("Full traceback", traceback=traceback.format_exc()) return JSONResponse({"error": str(e)}, status_code=500)