@fangcha/app-error
TypeScript icon, indicating that this package has built-in type declarations

1.6.0 • Public • Published

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)

/@fangcha/app-error/

    Package Sidebar

    Install

    npm i @fangcha/app-error

    Weekly Downloads

    60

    Version

    1.6.0

    License

    MIT

    Unpacked Size

    6.95 kB

    Total Files

    5

    Last publish

    Collaborators

    • fangqk1991