Handler for intercepting subgraph execution errors.
Called when an error occurs during subgraph execution.