n8n-io/n8n · error · NodeOperationError
${error.message}
Error message
${error.message} What it means
Per-item catch in the Ollama router's execute loop. When continueOnFail is off, any error from the selected operation's execute callback is re-thrown as a NodeOperationError annotated with itemIndex and the original error's description; the original message is preserved. Ollama errors typically originate from a local/self-hosted Ollama server.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/vendors/Ollama/actions/router.ts:41
break;
case 'text':
execute = text[ollamaTypeData.operation].execute;
break;
default:
throw new NodeOperationError(this.getNode(), `The resource "${resource}" is not supported!`);
}
for (let i = 0; i < items.length; i++) {
try {
const responseData = await execute.call(this, i);
returnData.push.apply(returnData, 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
- Read error.message for the underlying Ollama error.
- Verify the Ollama host/base URL in credentials is reachable and the model is pulled.
- Enable 'Continue On Fail' on the node if partial success is acceptable.
- Inspect the item at error.itemIndex and confirm required fields/binaries are present.
- Update Ollama server to a version that supports the requested operation.
Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-validate the Ollama host and model availability before the execute loop,
// since most Ollama errors stem from server/model issues rather than input data.
async function preflightOllama(this: IExecuteFunctions, model: string): Promise<string | null> {
const creds = await this.getCredentials('ollamaApi').catch(() => null);
if (!creds || !(creds as { url?: string }).url) return 'Ollama credentials are missing a URL';
return null;
}
function validateOllamaItem(item: INodeExecutionData, resource: string, operation: string): string | null {
if (!item || typeof item !== 'object') return 'item is missing';
if (resource === 'image' && !item.json?.image && !item.binary?.data) {
return 'image operation requires an image input (json.image or binary.data)';
}
return null;
} Type guard
function isItemIndexError(e: unknown): e is NodeOperationError & { itemIndex: number } {
return e instanceof NodeOperationError && typeof (e as { itemIndex?: number }).itemIndex === 'number';
} Try / catch
for (let i = 0; i < items.length; i++) {
try {
const responseData = await execute.call(this, i);
returnData.push.apply(returnData, responseData);
} catch (error) {
if (this.continueOnFail()) {
returnData.push({ json: { error: (error as Error).message }, pairedItem: { item: i } });
continue;
}
throw new NodeOperationError(this.getNode(), error, { itemIndex: i });
}
} Prevention
- Confirm the Ollama server URL in credentials is reachable and the named model is pulled (`ollama pull <model>`).
- Enable 'Continue On Fail' on the node when running batches where some items may be invalid.
- Pre-validate each item has the fields/binaries the chosen operation expects.
- Keep the Ollama server version current for the operations you use.
When it happens
Trigger: Ollama operation threw for item i — model not pulled/available on the server, connection refused/timeout to the Ollama host, model returned an error, image input missing or unsupported by the model. With continueOnFail on, the error is captured into the item's JSON instead.
Common situations: Ollama server URL wrong or down in credentials; named model not yet pulled (`ollama pull <model>`); input item missing the binary field expected by an image-capable model; Ollama version too old for the requested feature; one bad item aborts a batch with continueOnFail off.
Related errors
- ${error.message}
- ${error.message}
- ${error.message}
- The resource "${resource}" is not supported!
- The operation "${operation}" is not supported for resource "
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/d63607d91c3574cf.
Report an issue: GitHub.