From b4b6434480e53d8a9d159ab824e5a1c7b3493dd2 Mon Sep 17 00:00:00 2001 From: Heitor Sammuel Carvalho Date: Thu, 18 Dec 2025 11:00:16 -0300 Subject: [PATCH] Add flow failed event --- lib/crewai/src/crewai/events/types/flow_events.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/crewai/src/crewai/events/types/flow_events.py b/lib/crewai/src/crewai/events/types/flow_events.py index a35254192..96302933c 100644 --- a/lib/crewai/src/crewai/events/types/flow_events.py +++ b/lib/crewai/src/crewai/events/types/flow_events.py @@ -67,6 +67,16 @@ class FlowFinishedEvent(FlowEvent): state: dict[str, Any] | BaseModel +class FlowFailedEvent(FlowEvent): + """Event emitted when a flow fails execution""" + + flow_name: str + error: Exception + type: str = "flow_failed" + + model_config = ConfigDict(arbitrary_types_allowed=True) + + class FlowPlotEvent(FlowEvent): """Event emitted when a flow plot is created"""