servie-errorhandler
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

Servie Errorhandler

NPM version NPM downloads Build status Test coverage

Map errors to a Servie response. Compatible with boom and http-errors.

Installation

npm install servie-errorhandler --save

Usage

import { Request } from "servie";
import { finalhandler } from "servie-finalhandler";
import { errorhandler } from "servie-errorhandler";
 
const app = compose([get(), post()]);
const req = new Request("/");
 
app(req, finalhandler(req)).catch(errorhandler(req));

TypeScript

This project is written using TypeScript and publishes the definitions directly to NPM.

License

Apache 2.0

Package Sidebar

Install

npm i servie-errorhandler

Weekly Downloads

18

Version

2.0.2

License

Apache-2.0

Unpacked Size

20.1 kB

Total Files

9

Last publish

Collaborators

  • blakeembrey