Warn when get_graph tries to draw edge that doesn't exist (#4021)

This commit is contained in:
Nuno Campos
2025-03-25 12:57:31 -07:00
committed by GitHub
+5
View File
@@ -499,6 +499,11 @@ class CompiledGraph(Pregel):
) -> None:
if end == END and END not in end_nodes:
end_nodes[END] = graph.add_node(self.get_output_schema(config), END)
if start not in start_nodes or end not in end_nodes:
logger.warning(
f"Could not add edge from '{start}' to '{end}' due to missing nodes"
)
return
return graph.add_edge(
start_nodes[start],
end_nodes[end],