From bb2fe9a6b8bb4ec91ecfda4cc4a5b0b9005953f0 Mon Sep 17 00:00:00 2001 From: YG Park Date: Wed, 24 Apr 2024 12:15:20 +0900 Subject: [PATCH] fix(ioredis): add try/catch for error handling in connect method --- packages/orm/ioredis/src/utils/registerConnectionProvider.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/orm/ioredis/src/utils/registerConnectionProvider.ts b/packages/orm/ioredis/src/utils/registerConnectionProvider.ts index 1fe60006235..81a4a9871aa 100644 --- a/packages/orm/ioredis/src/utils/registerConnectionProvider.ts +++ b/packages/orm/ioredis/src/utils/registerConnectionProvider.ts @@ -69,7 +69,9 @@ export function registerConnectionProvider({provide, name = "default"}: CreateCo } as RedisOptions); } - await connection.connect(); + try { + await connection.connect(); + } catch (e) {} logger.info("Connected to redis database...");