npm.io
1.6.0 • Published 3 years ago

@fangcha/app-error

Licence
MIT
Version
1.6.0
Deps
0
Size
7 kB
Vulns
0
Weekly
0
Stars
1

node-app-error

An error class contains statusCode, extras.

Installation

npm install @fangcha/app-error

Usage

In Node.js:

const AppError = require('@fangcha/app-error')
...
// somewhere you want to throw an exception.
throw new AppError(message, statusCode, extras)

Keywords