Skip to content
PACKAGES

operators.catch_error

Kind: function

Source: src/graphrefly/operators/_recover.py:78

catch_error(g: Graph, src: Node[Any], handler: Callable[[Any], Any], *, name: str | None = None, recipe: Recipe | None = None)

Follow src; at its ERROR call handler(error) once and follow the Node it returns from then on (O-catchError). DATA already sent stays sent; a COMPLETE passes without the handler; it switches at most once. Given a recipe that builds handler, it can be restored, on its replacement if it had switched.

The behavior is the root’s operator contract: the operator contracts.