From e45737aaaa91383756c976768af94539e46b0515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Boschi?= Date: Wed, 19 Jun 2024 14:38:55 +0200 Subject: [PATCH] fix: graph process should raise the actual error when failing --- src/backend/base/langflow/graph/graph/base.py | 2 +- tests/unit/conftest.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/base/langflow/graph/graph/base.py b/src/backend/base/langflow/graph/graph/base.py index 569b1be4b..5e176ef81 100644 --- a/src/backend/base/langflow/graph/graph/base.py +++ b/src/backend/base/langflow/graph/graph/base.py @@ -836,7 +836,7 @@ class Graph: next_runnable_vertices = await self._execute_tasks(tasks, lock=lock) except Exception as e: logger.error(f"Error executing tasks in layer {layer_index}: {e}") - break + raise e if not next_runnable_vertices: break to_process.extend(next_runnable_vertices) diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index 355cd5d2d..e9c51180d 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -224,6 +224,7 @@ def json_vector_store(): @pytest.fixture(name="client", autouse=True) def client_fixture(session: Session, monkeypatch, request, load_flows_dir): + monkeypatch.setenv("LANGFLOW_LOG_LEVEL", "DEBUG") # Set the database url to a test database if "noclient" in request.keywords: yield