mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-03 06:12:14 +08:00
fix: the frontend error when cancle the research plan (#719)
Co-authored-by: Willem Jiang <143703838+willem-bd@users.noreply.github.com>
This commit is contained in:
@@ -487,6 +487,11 @@ async def _stream_graph_events(
|
||||
yield event
|
||||
|
||||
logger.debug(f"[{safe_thread_id}] Graph event stream completed. Total events: {event_count}")
|
||||
except asyncio.CancelledError:
|
||||
# User cancelled/interrupted the stream - this is normal, not an error
|
||||
logger.info(f"[{safe_thread_id}] Graph event stream cancelled by user after {event_count} events")
|
||||
# Re-raise to signal cancellation properly without yielding an error event
|
||||
raise
|
||||
except Exception as e:
|
||||
logger.exception(f"[{safe_thread_id}] Error during graph execution")
|
||||
yield _make_event(
|
||||
|
||||
Reference in New Issue
Block a user