n8n-io/n8n · error · NodeOperationError

MongoDB connection error: ${error.message}

Error message

MongoDB connection error: ${error.message}

What it means

Error "MongoDB connection error: ${error.message}" thrown in n8n-io/n8n.

Source

Thrown at packages/@n8n/nodes-langchain/nodes/memory/MemoryMongoDbChat/MemoryMongoDbChat.node.ts:168

				memoryKey: 'chat_history',
				chatHistory: mongoDBChatHistory,
				returnMessages: true,
				inputKey: 'input',
				outputKey: 'output',
				k: this.getNodeParameter('contextWindowLength', itemIndex, 5) as number,
			});

			async function closeFunction() {
				await client.close();
			}

			return {
				closeFunction,
				response: logWrapper(memory, this),
			};
		} catch (error) {
			void client.close();
			throw new NodeOperationError(this.getNode(), `MongoDB connection error: ${error.message}`);
		}
	}
}

View on GitHub (pinned to 5ac6606e81)

When it happens

Trigger: Thrown at packages/@n8n/nodes-langchain/nodes/memory/MemoryMongoDbChat/MemoryMongoDbChat.node.ts:168 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/836dba9135c3de66. Report an issue: GitHub.