Skip to content

Commit 9621020

Browse files
author
Artem
committed
Fix status code when adding sentinel databases
1 parent 7be748f commit 9621020

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

redisinsight/api/src/utils/catch-redis-errors.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ export const getRedisConnectionException = (
3434
errorPlaceholder: string = '',
3535
): HttpException => {
3636
const { host, port } = connectionOptions;
37+
38+
if (error instanceof HttpException) {
39+
return error;
40+
}
41+
3742
if (error?.message) {
3843
if (error.message.includes(RedisErrorCodes.SentinelParamsRequired)) {
3944
return new HttpException(

0 commit comments

Comments
 (0)