lib/handlers/error.js
function (err, req, res) {
    console.error('uncaughtError', req.method + ' ' + req.url);
    this.sendErrorReport(err, req);

    if (req.accepts('html')) {
      this.renderErrorPage('error', err, req, res);
    } else {
      var error = new errors.HTTPError(500, 'Internal Server Error');
      this.renderError(error, req, res);
    }
  }
function (err, req, res) {
    console.error('uncaughtError', req.method + ' ' + req.url);
    this.sendErrorReport(err, req);

    if (req.accepts('html')) {
      this.renderErrorPage('error', err, req, res);
    } else {
      var error = new errors.HTTPError(500, 'Internal Server Error');
      this.renderError(error, req, res);
    }
  }
function ( err , req , res ) { console . error ( 'uncaughtError' , req . method + ' ' + req . url ) ; this . sendErrorReport ( err , req ) ; if ( req . accepts ( 'html' ) ) { this . renderErrorPage ( 'error' , err , req , res ) ; } else { var error = new errors . HTTPError ( 500 , 'Internal Server Error' ) ; this . renderError ( error , req , res ) ; } }
Displays a friendly 500 page in production if requesting html otherwise returns an appropriate format.
Displays a friendly 500 page in production if requesting html otherwise returns an appropriate format .