#Exception Managment in Stand Alone apps

4 messages · Page 1 of 1 (latest)

jolly wadi
#

I am genrating a Standalone App AK

const app = await NestFactory.createApplicationContext(AppModule, {logger: console});

And looking to implement a global exception handler,
It seems the both useGlobalFilters && assigning as a providor do not actually work

any suggestions ?

subtle moon
#

try/catch around whatever method you're calling in the standalone's main

jolly wadi
#

I am utilizing third party ( bull ) and others which are event based so out of try catch context

subtle moon
#

You'd have to try catch those anyways. Nest's exception filter doesn't normally catch those errors