ljlm0402 / typescript-express-starter

📘 Quick and Easy TypeScript Express Starter
http://npm.im/typescript-express-starter
MIT License
2.72k stars 419 forks source link

How to catch and log that error ? #181

Open hungify opened 2 years ago

hungify commented 2 years ago

I get an error at runtime In app.ts and server.ts. If I use a function, I can catch and log that error but the class can't do it.

  1. function:

image

  1. class:

image

server.ts

bootstrap(resolvers).catch((error) => {
   console.error('ERROR STARTING SERVER: ', error);
});
dap23 commented 1 year ago

have you try to throw an error into httpException?