diff --git a/src/backend/base/langflow/graph/graph/base.py b/src/backend/base/langflow/graph/graph/base.py index 7b054dbbf..7ddfcafae 100644 --- a/src/backend/base/langflow/graph/graph/base.py +++ b/src/backend/base/langflow/graph/graph/base.py @@ -762,8 +762,7 @@ class Graph: successors = self.get_all_successors(vertex, recursive=False) if not any(successor in vertices for successor in successors): return vertex - else: - raise ValueError(f"Vertex {vertex_id} is not a top level vertex") + raise ValueError(f"Vertex {vertex_id} is not a top level vertex or no root vertex found") async def build_vertex( self,