1.6.0 • Published 1 year ago

@fangcha/app-error v1.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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)