@tsq/app-error

1.0.1 • Public • Published

app-error

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

Readme

Keywords

Package Sidebar

Install

npm i @tsq/app-error

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

8.76 kB

Total Files

5

Last publish

Collaborators

  • tsq-me