koan-errors
v0.0.5
Published
Koa.js error handling middleware
Downloads
11
Maintainers
Readme
Koa.js error handling middleware for Koan.js
Based on koa-error
.
Supported content types:
- json
- html
Installation
$ npm install koan-errors
Options
template
: path to template (defaults to theerrors.html
from the package),engine
: templating engine to use (defaults toswig
).
Custom templates
Following local variables are available within a custom template:
env
,ctx
,request
,response
,error
,stack
,status
,code
.
Contributions
- are welcome;
- should be tested;
- should follow Koa.js coding style.
License
Copyright (c) 2014 Ruslan Bredikhin