From 652628c2e2b3ba5a331b2b5a1d242a878e2e2e02 Mon Sep 17 00:00:00 2001 From: ryjiang Date: Tue, 22 Oct 2024 11:12:06 +0800 Subject: [PATCH] fix connection failed due to lack of PrivilegeDescribeDatabase Signed-off-by: ryjiang --- server/src/database/databases.service.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/server/src/database/databases.service.ts b/server/src/database/databases.service.ts index 19b267eb..0656f67c 100644 --- a/server/src/database/databases.service.ts +++ b/server/src/database/databases.service.ts @@ -48,9 +48,15 @@ export class DatabasesService { const dbName = res.db_names[i]; - const dbObject = await this.describeDatabase(clientId, { - db_name: dbName, - }); + let dbObject = {} as DescribeDatabaseResponse; + try { + dbObject = await this.describeDatabase(clientId, { + db_name: dbName, + }); + } catch (e) { + // ignore + console.log('error', e); + } availableDatabases.push({ name: res.db_names[i], @@ -60,6 +66,7 @@ export class DatabasesService { }); } catch (e) { // ignore + console.log('error', e); } }