Skip to content

Commit d57305b

Browse files
Merge pull request #44 from RedisInsight/fix/RI-2003_cluster-node-error
Fix/ Cluster Node Error
2 parents 6865aba + ac59621 commit d57305b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

redisinsight/api/src/modules/core/services/redis/redis.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Injectable, Logger } from '@nestjs/common';
22
import { ConnectionOptions, SecureContextOptions } from 'tls';
33
import * as Redis from 'ioredis';
4+
import { isEmpty } from 'lodash';
45
import IORedis, { RedisOptions } from 'ioredis';
56
import { v4 as uuidv4 } from 'uuid';
67
import {
@@ -120,7 +121,7 @@ export class RedisService {
120121
});
121122
cluster.on('error', (e): void => {
122123
this.logger.error('Failed connection to the redis oss cluster', e);
123-
reject(e);
124+
reject(!isEmpty(e.lastNodeError) ? e.lastNodeError : e);
124125
});
125126
cluster.on('ready', (): void => {
126127
this.logger.log('Successfully connected to the redis oss cluster.');

0 commit comments

Comments
 (0)