n8n-io/n8n · error · NodeOperationError

Error during parsing of LLM output, please check your LLM mo

Error message

Error during parsing of LLM output, please check your LLM model and configuration

What it means

A generic NodeOperationError thrown by the Sentiment Analysis node's catch block when the inner try (LLM call + structured-output parsing) throws for any reason. It masks the underlying cause with a generic 'check your LLM model and configuration' message, recorded with itemIndex.

Source

Thrown at packages/@n8n/nodes-langchain/nodes/chains/SentimentAnalysis/SentimentAnalysis.node.ts:418

						);

						if (sentimentIndex !== -1) {
							const resultItem = { ...items[i] };
							const sentimentAnalysis: IDataObject = {
								category: output.sentiment,
							};
							if (options.includeDetailedResults) {
								sentimentAnalysis.strength = output.strength;
								sentimentAnalysis.confidence = output.confidence;
							}
							resultItem.json = {
								...resultItem.json,
								sentimentAnalysis,
							};
							returnData[sentimentIndex].push(resultItem);
						}
					} catch (error) {
						throw new NodeOperationError(
							this.getNode(),
							'Error during parsing of LLM output, please check your LLM model and configuration',
							{
								itemIndex: i,
							},
						);
					}
				} catch (error) {
					if (this.continueOnFail()) {
						const executionErrorData = this.helpers.constructExecutionMetaData(
							this.helpers.returnJsonArray({ error: error.message }),
							{ itemData: { item: i } },
						);
						returnData[0].push(...executionErrorData);
						continue;
					}
					throw error;
				}

View on GitHub (pinned to 5ac6606e81)

Solutions

  1. Enable Continue On Fail so the failing item returns an error JSON without aborting the run.
  2. Check the underlying error by temporarily removing the outer try/catch or logging response.reason before the rethrow.
  3. Verify the connected chat model is valid, has valid credentials, and supports structured output.
  4. Use a stronger instruction-following model and/or lower temperature.
  5. Retry on transient network errors using the node's retry settings.

Example fix

// before — original cause is lost
} catch (error) {
  throw new NodeOperationError(this.getNode(), 'Error during parsing of LLM output, please check your LLM model and configuration', { itemIndex: i });
}

// after — preserve the cause for diagnosis
} catch (error) {
  throw new NodeOperationError(this.getNode(), {
    message: 'Error during parsing of LLM output, please check your LLM model and configuration',
    itemIndex: i,
    cause: error,
  });
}
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-flight: verify model + credentials
if (!llm) throw new Error('Connect a chat model with valid credentials');

Try / catch

try {
  const out = await parser.parse(llmResult);
} catch (e) {
  // Preserve the cause and continue per-item rather than aborting
  resultData.push({ json: { error: (e as Error).message }, pairedItem: { item: i } });
}

Prevention

When it happens

Trigger: Any exception inside the sentiment-analysis per-item block: the LLM call fails, the StructuredOutputParser cannot coerce the output, a network/auth error occurs, or the model returns malformed text. The outer catch wraps it as this generic NodeOperationError.

Common situations: LLM API key invalid or rate-limited; model does not support the requested output schema; weak model returns free text; transient network error; temperature too high producing unparseable output.

Related errors


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