n8n-io/n8n · error · NodeOperationError

Auto-fixing parser prompt has to contain

Error message

Auto-fixing parser prompt has to contain {error} placeholder

What it means

The auto-fixing parser feeds parse failures back to the model via a customizable prompt; that prompt must contain the {error} placeholder so the validation error can be inserted. The configured options.prompt is empty or lacks '{error}', making the fix-up prompt unusable.

Solutions

  1. Keep (or restore) the {error} placeholder in the custom prompt
  2. Leave the prompt empty to use the built-in default prompt, which contains the placeholder
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/@n8n/nodes-langchain/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.ts:114 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/cad118dc2eb17975. Report an issue: GitHub.

Appendix: source

Thrown at packages/@n8n/nodes-langchain/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.ts:114

					},
				],
			},
		],
	};

	async supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData> {
		const model = (await this.getInputConnectionData(
			NodeConnectionTypes.AiLanguageModel,
			itemIndex,
		)) as BaseLanguageModel;
		const outputParser = (await this.getInputConnectionData(
			NodeConnectionTypes.AiOutputParser,
			itemIndex,
		)) as N8nStructuredOutputParser;
		const prompt = this.getNodeParameter('options.prompt', itemIndex, NAIVE_FIX_PROMPT) as string;

		if (prompt.length === 0 || !prompt.includes('{error}')) {
			throw new NodeOperationError(
				this.getNode(),
				'Auto-fixing parser prompt has to contain {error} placeholder',
			);
		}
		const parser = new N8nOutputFixingParser(
			this,
			model,
			outputParser,
			PromptTemplate.fromTemplate(prompt),
		);

		return {
			response: parser,
		};
	}
}

View on GitHub (pinned to 5ac6606e81)