README
@ash-framework/http-error
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 // 404
error.message // 'Not Found'
error.name // 'HttpError'
error.stack // will output stack trace
With status code and custom message
const error = new HttpError(404, 'custom error message')
error.status // 404
error.message // 'custom error message'
error.name // 'HttpError'
error.stack // will output stack trace
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
Sponsors
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:
- Copyright © Richard Walker
and licensed under:

