diff --git a/src/backend/langflow/graph/graph/base.py b/src/backend/langflow/graph/graph/base.py index 5fd00d09b..3653a0ec5 100644 --- a/src/backend/langflow/graph/graph/base.py +++ b/src/backend/langflow/graph/graph/base.py @@ -10,6 +10,7 @@ from langflow.graph.vertex.types import ( ) from langflow.interface.tools.constants import FILE_TOOLS from langflow.utils import payload +from langflow.utils.logger import logger class Graph: @@ -43,7 +44,9 @@ class Graph: edges = payload["edges"] return cls(nodes, edges) except KeyError as exc: - raise ValueError("Invalid payload") from exc + raise ValueError( + f"Invalid payload. Expected keys 'nodes' and 'edges'. Found {list(payload.keys())}" + ) from exc def _build_graph(self) -> None: """Builds the graph from the nodes and edges."""