{"record":{"id":"cf623c93ebafa279","repo":"n8n-io/n8n","slug":"redis-error-error-message","errorCode":null,"errorMessage":"Redis Error: ${error.message}","messagePattern":"Redis Error: (.+?)","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.ts","lineNumber":150,"sourceCode":"\t\t\t\ttls: credentials.ssl === true,\n\t\t\t},\n\t\t\tdatabase: credentials.database as number,\n\t\t};\n\n\t\tif (credentials.user && nodeVersion >= 1.5) {\n\t\t\tredisOptions.username = credentials.user as string;\n\t\t}\n\t\tif (credentials.password) {\n\t\t\tredisOptions.password = credentials.password as string;\n\t\t}\n\n\t\tconst client = createClient({\n\t\t\t...redisOptions,\n\t\t});\n\n\t\tclient.on('error', async (error: Error) => {\n\t\t\tawait client.quit();\n\t\t\tthrow new NodeOperationError(this.getNode(), 'Redis Error: ' + error.message);\n\t\t});\n\n\t\tconst redisChatConfig: RedisChatMessageHistoryInput = {\n\t\t\tclient,\n\t\t\tsessionId,\n\t\t};\n\n\t\tif (sessionTTL > 0) {\n\t\t\tredisChatConfig.sessionTTL = sessionTTL;\n\t\t}\n\t\tconst redisChatHistory = new RedisChatMessageHistory(redisChatConfig);\n\n\t\tconst memClass = this.getNode().typeVersion < 1.3 ? BufferMemory : BufferWindowMemory;\n\t\tconst kOptions =\n\t\t\tthis.getNode().typeVersion < 1.3\n\t\t\t\t? {}\n\t\t\t\t: { k: this.getNodeParameter('contextWindowLength', itemIndex) };\n","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.ts#L132-L168","documentation":"Redis client 'error' event fired during Memory Redis Chat setup (connection refused, auth failure, TLS mismatch). The handler quits the client and rethrows the driver message as a NodeOperationError from the memory node.","triggerScenarios":"Thrown at packages/@n8n/nodes-langchain/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.ts:150 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the Redis connection settings (host, port, user, password, database, TLS) in the credential","Ensure the Redis server is reachable from n8n"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","contentChangedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}