express-page-error-middleware
Error pages handling middleware for express
Install
$ npm install --save express-page-error-middleware
Usage
Below is a example of usage. test/fixture/app.js also have a similar example.
var express = ;var errorMiddleware = ; var app = ; // define your routes // this will add a 404 error if the request is not handled before and render an error pageapp;
Template
Variables provided inside the template.
code
status codedetail
messageerror
error objectstack
error stackurl
bind this e.g. while throwing an API error objecterr.url = apiRequest.url
, to see what API url has caused it