From 8cb831e49189743ea461550bd847a5d60758bd09 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 4 Jan 2024 14:39:07 +0530 Subject: [PATCH 1/2] refactor: better error message --- packages/nocodb/src/utils/nc-config/NcConfig.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/nocodb/src/utils/nc-config/NcConfig.ts b/packages/nocodb/src/utils/nc-config/NcConfig.ts index 1cf0c1c341..7e9a0a0956 100644 --- a/packages/nocodb/src/utils/nc-config/NcConfig.ts +++ b/packages/nocodb/src/utils/nc-config/NcConfig.ts @@ -44,6 +44,7 @@ export class NcConfig { env: string; workingEnv: string; baseType: string; + private logger = new Logger(NcConfig.name); private constructor() {} @@ -162,7 +163,7 @@ export class NcConfig { database: this.meta.db?.connection?.filename, }); } else { - throw new Error('Configuration missing meta db connection'); + throw new Error('Meta database configuration missing SQLite file name'); } await metaSqlClient.knex.destroy(); } else { @@ -173,7 +174,7 @@ export class NcConfig { ); await metaSqlClient.knex.destroy(); } else { - throw new Error('Configuration missing meta db connection'); + throw new Error('Meta database configuration missing database name'); } } } From 5a0a29c9ba1029e737da70287136848b2002094c Mon Sep 17 00:00:00 2001 From: Pranav C Date: Fri, 5 Jan 2024 11:11:46 +0530 Subject: [PATCH 2/2] refactor: remove unused logger init --- packages/nocodb/src/utils/nc-config/NcConfig.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/nocodb/src/utils/nc-config/NcConfig.ts b/packages/nocodb/src/utils/nc-config/NcConfig.ts index 7e9a0a0956..40de298af8 100644 --- a/packages/nocodb/src/utils/nc-config/NcConfig.ts +++ b/packages/nocodb/src/utils/nc-config/NcConfig.ts @@ -44,7 +44,6 @@ export class NcConfig { env: string; workingEnv: string; baseType: string; - private logger = new Logger(NcConfig.name); private constructor() {}