Overview
Pipecat Flows defines a hierarchy of exceptions for handling errors during flow execution. All exceptions inherit fromFlowError, making it possible to catch all flow-related errors with a single handler.
Exception Hierarchy
FlowError
FlowInitializationError
initialize() fails, such as when the initial node config is invalid.
Raised by: FlowManager.initialize()
FlowTransitionError
FlowManager.set_node_from_config(), internal node transition logic
InvalidFunctionError
(result, next_node) tuple, or a tool on a node built in Python that returns TRANSITION_IN_YAML.
Raised by: Function registration, FlowsDirectFunctionWrapper.validate_function(), and the handler that runs a function call
ActionError
tts_say, end_conversation, function) and custom registered actions. Common causes include missing required fields (e.g., text for tts_say), unregistered action types, or handler execution errors.
Raised by: ActionManager.execute_actions(), action handler registration
FlowReferenceError
Flow checks every tool and action handler the config names and raises this once, with every unresolved reference, rather than stopping at the first.
Raised by: Flow.__init__()
Every unresolved reference, in the order found. Also rendered into the
exception’s message, one per line.
FlowProblem
FlowReferenceError carries a list of them.