Skip to content

koanjs/koan-errors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Koa.js error handling middleware for Koan.js

Build Status Dependency Status Coverage Status NPM version

Based on koa-error.

Supported content types:

  • json
  • html

Installation

$ npm install koan-errors

Options

  • template: path to template (defaults to the errors.html from the package),
  • engine: templating engine to use (defaults to swig).

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

The MIT License

Copyright (c) 2014 Ruslan Bredikhin

About

Koa.js error handling middleware

Resources

Stars

Watchers

Forks

Packages

No packages published