@ash-framework/http-error
![Dev Dependency Status](https://img.shields.io/david/dev/ash-framework/http-error.svg)
Class for throwing http specific errors
Install
- Install:
npm install --save @ash-framework/http-error
- Module:
require('@ash-framework/http-error')
Usage
Api
new HttpError(code, message)
With status code but no message
const error = new HttpError(404)
error.status
error.message
error.name
error.stack
With status code and custom message
const error = new HttpError(404, 'custom error message')
error.status
error.message
error.name
error.stack
History
Discover the release history by heading on over to the releases page.
Backers
Maintainers
These amazing people are maintaining this project:
- Richard Walker digitalsadhu@gmail.com
These amazing people have contributed finances to this project:
Become a sponsor!
Contributors
These amazing people have contributed code to this project:
License
Unless stated otherwise all works are:
and licensed under: