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