simple-http-errors

A simple Error generator

Usage no npm install needed!

<script type="module">
  import simpleHttpErrors from 'https://cdn.skypack.dev/simple-http-errors';
</script>

README

Simple HTTP Errors

A simple error maker thingy.

Codes

UNAUTHORIZED: 401
NOT_FOUND: 404
UNPROCESSABLE_ENTITY: 422

(more coming as needed)

Use

var errors = require('simple-http-errors');

//...
if (item === undefined) {
  return next(errors.notFound());
}