npm.io
0.1.0 • Published 3 years ago

@hndlr/errors

Licence
ISC
Version
0.1.0
Deps
1
Size
44 kB
Vulns
0
Weekly
0

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

Keywords