interceptNodeExecutionFailed

fun interceptNodeExecutionFailed(feature: AIAgentGraphFeature<*, *>, handle: suspend (eventContext: NodeExecutionFailedContext) -> Unit)(source)

Intercepts and handles node execution errors for a given feature.

Parameters

feature

The feature associated with this handler.

handle

A suspend function that processes the node execution error.

Example:

pipeline.interceptNodeExecutionFailed(feature) { eventContext ->
logger.error("Node ${eventContext.node.name} execution failed with error: ${eventContext.throwable}")
}