@tsq/app-error
v1.0.1
Published
A custom error class for Node.js
Downloads
1
Readme
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