fix: pnpm i without db connection

This commit is contained in:
Mir Arif Hasan
2023-11-30 16:44:59 +06:00
parent 11e2e18aa3
commit 02dcc018fa
3 changed files with 24 additions and 12 deletions

View File

@@ -105,7 +105,10 @@ export class InfraConfigService implements OnModuleInit {
stopApp();
}
} catch (error) {
if (error.code === 'P2021') {
if (error.code === 'P1001') {
// Prisma error code for 'Can't reach at database server'
// We're not throwing error here because we want to allow the app to run 'pnpm install'
} else if (error.code === 'P2021') {
// Prisma error code for 'Table does not exist'
throwErr(DATABASE_TABLE_NOT_EXIST);
} else {