n8n-io/n8n · error · NodeOperationError
${error.message}
Error message
${error.message} What it means
During the Assistant Message operation (v1), errors from the LangChain/OpenAI client are caught. If the error is not an instance of BaseError (OpenAI SDK's base error class), it is rethrown as a NodeOperationError with the raw error.message. This is a catch-all for non-SDK errors that bubble up during assistant run execution.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/vendors/OpenAi/v1/actions/assistant/message.operation.ts:319
});
response.usage = threadRun.usage;
}
}
if (
options.preserveOriginalTools !== false &&
nodeVersion >= 1.3 &&
(assistantTools ?? [])?.length
) {
await client.beta.assistants.update(assistantId, {
tools: assistantTools,
});
}
// Remove configuration properties and runId added by Langchain that are not relevant to the user
filteredResponse = omit(response, ['signal', 'timeout', 'content', 'runId']) as IDataObject;
} catch (error) {
if (!(error instanceof BaseError)) {
throw new NodeOperationError(this.getNode(), error.message, { itemIndex: i });
}
}
return [{ json: filteredResponse, pairedItem: { item: i } }];
}
View on GitHub (pinned to 5ac6606e81)
Solutions
- Inspect the full error.message to identify the root cause — it is the raw underlying error text
- Check network connectivity and OpenAI API status
- Simplify the assistant's tool configuration to isolate which tool is failing
- If the error is a timeout, increase the maxToolsIterations or reduce prompt complexity
Defensive patterns
Strategy: try-catch
Type guard
import { BaseError } from 'openai/error';
function isOpenAiBaseError(error: unknown): error is BaseError {
return error instanceof BaseError;
} Try / catch
try {
await runAssistantMessage(this, i);
} catch (error) {
if (error instanceof NodeOperationError) {
// Inspect error.message for root cause — it is the raw underlying error
console.error(`Item ${i} failed: ${error.message}`);
if (this.continueOnFail()) {
returnData.push({ json: { error: error.message }, pairedItem: { item: i } });
continue;
}
}
throw error;
} Prevention
- Enable continueOnFail to collect all errors across items instead of stopping
- Inspect the raw error.message for root cause identification
- Test assistant tools individually to isolate which tool causes failures
- Check OpenAI API status for service-side issues
When it happens
Trigger: The assistant message/run operation encounters an error that is not an OpenAI SDK BaseError — e.g. a network error, a serialization error, a LangChain internal error, or a timeout from the client library. The catch block wraps the raw message into a NodeOperationError with itemIndex context.
Common situations: Network connectivity issues during long assistant runs; LangChain tool execution failures that throw non-BaseError exceptions; JSON serialization errors in tool output; client-side timeout before the API returns.
Related errors
- An assistant with the same name '${name}' already exists
- The maximum number of files that can be attached to the assi
- Invalid file_ids type
- The maximum number of files that can be attached to the assi
- A non-empty prompt is required.
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/075ba54941ec8b24.
Report an issue: GitHub.