From 82d33d6e072a8777a6ddbfb39f496183573a70f9 Mon Sep 17 00:00:00 2001 From: Ayush Mukherjee Date: Mon, 7 Nov 2022 19:35:31 +0530 Subject: [PATCH] add a throw for silent nest errors --- src/main.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main.ts b/src/main.ts index 5a5fd57..2434f5e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,8 +3,12 @@ import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; async function bootstrap() { - const app = await NestFactory.create(AppModule); - app.useGlobalPipes(new ValidationPipe()); - await app.listen(3000); + try { + const app = await NestFactory.create(AppModule); + app.useGlobalPipes(new ValidationPipe()); + await app.listen(3000); + } catch (e) { + throw e; + } } bootstrap();