Http exception filter for NestJS It is used to correctly log all http exceptions
// main.tsconst { httpAdapter } = app.get(HttpAdapterHost);const loggerFactory = app.get(WINSTON_MODULE_FACTORY_PROVIDER);app.useGlobalFilters(new HttpExceptionFilter(httpAdapter, loggerFactory)); Copy
// main.tsconst { httpAdapter } = app.get(HttpAdapterHost);const loggerFactory = app.get(WINSTON_MODULE_FACTORY_PROVIDER);app.useGlobalFilters(new HttpExceptionFilter(httpAdapter, loggerFactory));
Protected
Readonly
Http exception filter for NestJS It is used to correctly log all http exceptions
Example