Structured failure of a graph node.
Graph execution returns {:error, %LangEx.NodeError{}} when a node
raises (after its retry policy, if any, is exhausted) or its task
exits. The failing node name is in :node and the original exception
or exit reason is preserved in :reason, so callers can pattern match
on the underlying cause:
{:error, %LangEx.NodeError{node: :fetch, reason: %Req.TransportError{}}} =
LangEx.invoke(graph, input)
Summary
Functions
Wraps a raised exception or exit reason, preserving existing wrappers.
Types
@type t() :: %LangEx.NodeError{ __exception__: true, node: atom(), reason: term(), stacktrace: Exception.stacktrace() }
Functions
@spec wrap(atom(), term(), Exception.stacktrace()) :: t()
Wraps a raised exception or exit reason, preserving existing wrappers.