0.1.0 • Published 8 months ago

@hndlr/errors v0.1.0

Weekly downloads
24
License
ISC
Repository
github
Last release
8 months ago

erred

erred is a JS-less NPM Package for HTTPErrors that builds on publish

Usage

Import or require the errors and use them in place of your normal errors

const { NotFound, BadRequest } = require('@hndlr/errors')

let error = new NotFound('...')
error.status // 404

error = new BadRequest('...')
error.status // 400