1.3.0 • Published 11 months ago

@donutteam/koa-error-handler v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Koa Error Handler

A class for creating Koa middlewares that catch downstream errors.

Installation

Install the package with NPM:

npm install @donutteam/koa-error-handler

Usage

To use this class, simply instantiate an instance and add it to your Koa stack:

import Koa from "koa";

import { ErrorHandlerMiddleware } from "@donutteam/koa-error-handler";

const app = new Koa();

const errorHandlerMiddleware = new ErrorHandlerMiddleware();

// Be sure to add the execute function on the instance
// and NOT the instance itself
app.use(errorHandlerMiddleware.execute);

License

MIT

1.2.0

11 months ago

1.1.0

11 months ago

1.3.0

11 months ago

1.0.1

2 years ago

1.0.0

2 years ago