Business exception with interceptor to help log and handle error messages on NestJs
npm i --save business-exception-nestjs
- Import BusinessExceptionModule on your AppModule using forRoot or forRootAsync methods.
- Add interceptor BusinessExceptionInterceptor on your AppModule.
- Use responseOnBusinessException config property to transform response when throw BusinessException on your code.
- The logOnBusinessException config property is called when throw BusinessException on your code.
- The logOnAnyException config property is called when throw any exception on your code.