UNPKG

@nestjs/core

Version:

The core of NestJS, a TypeScript framework for Node.js backends: modules, dependency injection and the request pipeline, on Express, Fastify or node:http.

12 lines (11 loc) • 386 B
import { IntrinsicException, Logger } from '@nestjs/common'; export class ExternalExceptionFilter { static logger = new Logger('ExceptionsHandler'); catch(exception, host) { if (exception instanceof Error && !(exception instanceof IntrinsicException)) { ExternalExceptionFilter.logger.error(exception); } throw exception; } }