This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@donutteam/koa-error-handler
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

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

Package Sidebar

Install

npm i @donutteam/koa-error-handler

Weekly Downloads

1

Version

1.3.0

License

MIT

Unpacked Size

3.78 kB

Total Files

5

Last publish

Collaborators

  • duckdotexe