node package manager


Koa.js error handling middleware

Koa.js error handling middleware for Koan.js

Based on koa-error.

Supported content types:

  • json
  • html
$ npm install koan-errors
  • template: path to template (defaults to the errors.html from the package),
  • engine: templating engine to use (defaults to swig).

Following local variables are available within a custom template:

  • env,
  • ctx,
  • request,
  • response,
  • error,
  • stack,
  • status,
  • code.
  • are welcome;
  • should be tested;
  • should follow Koa.js coding style.

The MIT License

Copyright (c) 2014 Ruslan Bredikhin