n8n-io/n8n · error · Error
SplitInBatches node error handling is managed by SplitInBatc
Error message
SplitInBatches node error handling is managed by SplitInBatchesBuilder
What it means
Thrown by SplitInBatchesNodeInstance.onError(). Error routing for SplitInBatches must be configured through the builder, not the generic per-node onError hook, because the loop semantics interact with error handling. The node-level onError is therefore blocked.
Source
Thrown at packages/@n8n/workflow-sdk/src/workflow-builder/control-flow-builders/split-in-batches.ts:71
}
input(_index: number): InputTarget {
throw new Error('SplitInBatches node input connections are managed by SplitInBatchesBuilder');
}
output(_index: number): OutputSelector<'n8n-nodes-base.splitInBatches', string, unknown> {
throw new Error('SplitInBatches node output connections are managed by SplitInBatchesBuilder');
}
to<T extends NodeInstance<string, string, unknown>>(
_target: T | T[] | InputTarget,
_outputIndex?: number,
): NodeChain<NodeInstance<'n8n-nodes-base.splitInBatches', string, unknown>, T> {
throw new Error('SplitInBatches node connections are managed by SplitInBatchesBuilder');
}
onError<T extends NodeInstance<string, string, unknown>>(_handler: T): this {
throw new Error('SplitInBatches node error handling is managed by SplitInBatchesBuilder');
}
getConnections(): DeclaredConnection[] {
return [];
}
}
/**
* A batch of nodes - either a single node or an array of nodes for fan-out
*/
export type NodeBatch =
| NodeInstance<string, string, unknown>
| Array<NodeInstance<string, string, unknown>>;
/**
* Target for a branch in named object syntax.
* Can be:
* - null: no connection for this branchView on GitHub (pinned to 5ac6606e81)
Solutions
- Configure error handling through the SplitInBatches builder API.
- Attach onError to the surrounding non-loop nodes instead.
- Filter SplitInBatches nodes out before applying a uniform onError pass.
Example fix
// before sibNode.onError(errorHandler); // after // wire error handling on the nodes inside the each/done branches, // or via the builder's dedicated error configuration
Defensive patterns
Strategy: type-guard
Validate before calling
function safeOnError(node: NodeInstance, handler: NodeInstance): void {
if (node.type === 'n8n-nodes-base.splitInBatches') {
throw new Error('Configure SIB error handling via the builder');
}
node.onError(handler);
} Type guard
function isSplitInBatches(node: NodeInstance): node is NodeInstance<'n8n-nodes-base.splitInBatches', string, unknown> {
return node.type === 'n8n-nodes-base.splitInBatches';
} Prevention
- Attach onError to surrounding non-loop nodes rather than the SplitInBatches node.
- Filter SplitInBatches nodes out before a uniform onError pass.
- Use the builder's error configuration for loop error handling.
When it happens
Trigger: Calling sibNode.onError(errorHandler) to attach an error route directly; generic error-wiring code that calls onError on every node.
Common situations: Attaching an error handler uniformly across all nodes in a list; assuming onError works the same on loop nodes.
Related errors
- SplitInBatches node input connections are managed by SplitIn
- SplitInBatches node output connections are managed by SplitI
- SplitInBatches node connections are managed by SplitInBatche
- Named object syntax does not support .onEachBatch() - branch
- Named object syntax does not support .onDone() - branches ar
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/2274a008ae3b32b1.
Report an issue: GitHub.