n8n-io/n8n · error · ConnectionError

CONNECTION_TYPE_INFERENCE_ERROR

CONNECTION_TYPE_INFERENCE_ERROR

Error message

${inferResult.error}

What it means

inferConnectionType returned an explicit error while trying to derive the connection type between the two matched nodes (e.g. incompatible node types or no shared connection capability). The message is the inference error itself; it is wrapped in a ConnectionError with both node IDs and surfaced to the LLM as a CONNECTION_TYPE_INFERENCE_ERROR tool response.

Solutions

  1. Read the embedded inference message — it names the specific incompatibility between source and target
  2. Pick different nodes, or insert an intermediate node that bridges the two types
  3. If node descriptions allow the connection, the version-specific outputs/inputs may mismatch — align node versions
  4. Specify the connection type explicitly if the tool input supports it instead of relying on inference
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at packages/@n8n/ai-workflow-builder.ee/src/tools/connect-nodes.tool.ts:150 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at packages/@n8n/ai-workflow-builder.ee/src/tools/connect-nodes.tool.ts:150

				logger?.debug(
					`Attempting to connect: ${matchedSourceNode.name} -> ${matchedTargetNode.name}`,
				);

				const inferResult = inferConnectionType(
					matchedSourceNode,
					matchedTargetNode,
					sourceNodeType,
					targetNodeType,
				);

				if (inferResult.error) {
					const connectionError = new ConnectionError(inferResult.error, {
						fromNodeId: matchedSourceNode.id,
						toNodeId: matchedTargetNode.id,
					});
					const error = {
						message: connectionError.message,
						code: 'CONNECTION_TYPE_INFERENCE_ERROR',
						details: {
							sourceNode: matchedSourceNode.name,
							targetNode: matchedTargetNode.name,
							possibleTypes: inferResult.possibleTypes,
						},
					};
					reporter.error(error);
					return createErrorResponse(config, error);
				}

				if (!inferResult.connectionType) {
					const error = {
						message: 'Could not infer connection type',
						code: 'CONNECTION_TYPE_INFERENCE_FAILED',
						details: {
							sourceNode: matchedSourceNode.name,
							targetNode: matchedTargetNode.name,
						},

View on GitHub (pinned to 5ac6606e81)