business-exception-nestjs

Business exception with interceptor to help log and handle error messages on NestJs


Keywords
nestjs, interceptor, exception
License
ISC
Install
npm install business-exception-nestjs@0.0.1

Documentation

business-exception-nestjs

Description

Business exception with interceptor to help log and handle error messages on NestJs

Instalation

npm i --save business-exception-nestjs

Quick Start

  1. Import BusinessExceptionModule on your AppModule using forRoot or forRootAsync methods.
  2. Add interceptor BusinessExceptionInterceptor on your AppModule.
  3. Use responseOnBusinessException config property to transform response when throw BusinessException on your code.
  4. The logOnBusinessException config property is called when throw BusinessException on your code.
  5. The logOnAnyException config property is called when throw any exception on your code.