Handle exception when getting vertices in chat.py
This commit is contained in:
parent
9481f76b05
commit
b50a0feddf
1 changed files with 6 additions and 1 deletions
|
|
@ -300,7 +300,12 @@ async def get_vertices(
|
|||
chat_service.set_cache(flow_id, graph)
|
||||
|
||||
if component_id:
|
||||
vertices = graph.sort_up_to_vertex(component_id)
|
||||
try:
|
||||
vertices = graph.sort_up_to_vertex(component_id)
|
||||
except Exception as exc:
|
||||
logger.error(f"IN DEVELOPMENT: Error getting vertices: {exc}")
|
||||
logger.exception(exc)
|
||||
vertices = graph.layered_topological_sort()
|
||||
else:
|
||||
vertices = graph.layered_topological_sort()
|
||||
# Now vertices is a list of lists
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue