1.0.1 • Published 6 years ago

@tsq/app-error v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

app-error

npm.io

a custome error class for Express.js

Install

npm i @tsq/app-error

Usage

const express = require('express');

const {
  HttpHandleException,
  expressNotFoundHandle,
  expressPrepareErrorObj,
  expressErrorHandleConsoleLog,
  expressLastErrorHandle
} = require('@tsq/app-error');

const app = express();

// the last position of route
app.use(expressNotFoundHandle);
app.use(expressPrepareErrorObj);
app.use(expressErrorHandleConsoleLog);
app.use(expressLastErrorHandle);

Dependencies

  • @tsq/express-response