n8n-io/n8n · error · NodeOperationError

${error.message}

Error message

${error.message}

What it means

Thrown by the Anthropic router's item-processing loop when an inner execute function throws and 'Continue On Fail' is NOT enabled. The caught error is re-wrapped as a NodeOperationError with the current itemIndex and error.description (if present). Note: if the caught error is not a standard Error with a .message property, accessing error.message may itself fail or yield undefined, since the catch is untyped.

Source

Thrown at packages/@n8n/nodes-langchain/nodes/vendors/Anthropic/actions/router.ts:56

			break;
		default:
			throw new NodeOperationError(
				this.getNode(),
				`The operation "${operation}" is not supported!`,
			);
	}

	for (let i = 0; i < items.length; i++) {
		try {
			const responseData = await execute.call(this, i);
			returnData.push(...responseData);
		} catch (error) {
			if (this.continueOnFail()) {
				returnData.push({ json: { error: error.message }, pairedItem: { item: i } });
				continue;
			}

			throw new NodeOperationError(this.getNode(), error, {
				itemIndex: i,
				description: error.description,
			});
		}
	}

	return [returnData];
}

View on GitHub (pinned to 5ac6606e81)

Solutions

  1. Read the wrapped error.message — it contains the original error's message which identifies the root cause.
  2. Fix the root cause: update credentials, reduce prompt length, fix the input data for the failing item index, or select a valid model.
  3. Enable 'Continue On Fail' in the node's Settings tab if you need the workflow to proceed past the failing item.
  4. Check the execution detail for the specific itemIndex to see which input item triggered the failure.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  // ... Anthropic node execution logic ...
} catch (error) {
  if (error instanceof NodeOperationError && error.itemIndex !== undefined) {
    console.error(`Item ${error.itemIndex} failed: ${error.message}`);
    // route to error handling, retry, or skip
  }
  throw error;
}

Prevention

When it happens

Trigger: Any error thrown during the actual operation execution for a specific input item when Continue On Fail is disabled. The original error is caught at router.ts:50 and re-thrown at line 56. Common sources include API errors from Anthropic (rate limits, invalid model, content policy), input validation failures from the operation modules, or binary data access errors.

Common situations: Anthropic API rate limit (429); invalid model ID; message content triggers safety filter; binary attachment too large or wrong format; API key expired or lacking permissions; prompt exceeds token limits.

Related errors


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