n8n-io/n8n · error · Error

Sticky notes do not support error handlers

Error message

Sticky notes do not support error handlers

What it means

Thrown by StickyNoteInstance.onError(). Sticky notes carry no executable logic and have no error output, so attaching an error handler to one is meaningless and is blocked.

Source

Thrown at packages/@n8n/workflow-sdk/src/workflow-builder/node-builders/node-builder.ts:1164

	}

	input(_index: number): InputTarget {
		throw new Error('Sticky notes do not support input connections');
	}

	output(_index: number): OutputSelector<'n8n-nodes-base.stickyNote', 'v1', void> {
		throw new Error('Sticky notes do not support output connections');
	}

	to<T extends NodeInstance<string, string, unknown>>(
		_target: T | T[] | InputTarget,
		_outputIndex?: number,
	): NodeChain<NodeInstance<'n8n-nodes-base.stickyNote', 'v1', void>, T> {
		throw new Error('Sticky notes do not support connections');
	}

	onError<T extends NodeInstance<string, string, unknown>>(_handler: T): this {
		throw new Error('Sticky notes do not support error handlers');
	}

	getConnections(): DeclaredConnection[] {
		return [];
	}
}

/**
 * Create a sticky note for workflow documentation.
 *
 * Like any other node, the returned sticky must be passed to
 * `workflow(...)` (or `.add(...)`) to appear on the canvas. The optional
 * `nodes` array is **only** used to size and anchor the sticky around the
 * given nodes — it does **not** add them to the workflow.
 *
 * @param content - Markdown content for the sticky note
 * @param nodesOrConfig - Optional nodes to wrap (sizes the sticky around them; the nodes themselves still need to be added to the workflow). Pass a config object to skip wrapping.
 * @param config - Optional configuration (color, position, size)

View on GitHub (pinned to 5ac6606e81)

Solutions

  1. Do not call .onError() on a StickyNoteInstance.
  2. Filter stickies out before applying a uniform onError pass.
  3. Attach onError only to executable nodes (Code, HTTP, IF, etc.).

Example fix

// before
for (const n of allNodes) n.onError(handler); // throws on sticky
// after
for (const n of allNodes.filter((x) => x.type !== 'n8n-nodes-base.stickyNote')) {
  n.onError(handler);
}
Defensive patterns

Strategy: type-guard

Validate before calling

const STICKY = 'n8n-nodes-base.stickyNote';

function safeOnError(node: NodeInstance, handler: NodeInstance): void {
  if (node.type === STICKY) return; // skip stickies
  node.onError(handler);
}

Type guard

function isStickyNote(node: NodeInstance): node is NodeInstance<'n8n-nodes-base.stickyNote', 'v1', void> {
  return node.type === 'n8n-nodes-base.stickyNote';
}

Prevention

When it happens

Trigger: Calling stickyNode.onError(handler); generic error-wiring pass that calls .onError() on every node including stickies.

Common situations: Applying a uniform error-handling policy across all nodes; assuming every NodeInstance supports onError.

Related errors


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/30ff081cfb88fba5. Report an issue: GitHub.