Error response middleware with template engines
- Source:
- middlewares/templatedError.js
Methods
-
<inner> koaError(options)
-
Parameters:
Name Type Description options
Object Template options
- Source:
- middlewares/templatedError.js
Properties:
Name Type Argument Default Description options.template
string Path to template written with your template engine
options.engine
string Path to template written with your template engine
options.cache
bool Path to template written with your template engine, default: NODE_ENV != 'development'
options.env
string <optional>
'development' Path to template written with your template engine
options.accepts
Array.<string> Mimetypes passed to ctx.accepts, default: [ 'html', 'text', 'json' ]