docs: function error404(options) {
      options = _.merge({}, DEF_CONFIG, options);
  
      // pre-compile underscore template if available
      if (typeof options.template === 'string' && options.template.length > 0) {
          options.template = _.template(options.template);
      }
  
      return function (req, res, next) {
  
          var error = {
              status: options.status,
              code: options.code,
              message: options.message,
              cause: {path: req.path, url: req.url, originalUrl: req.originalUrl, baseUrl: req.baseUrl, query: req.query}
          };
  
          res.status(error.status);
  
          switch (req.accepts(['json', 'html'])) {
              case 'json':
                  return res.json(error);
              case 'html':
                  if (typeof options.template === 'function') {
                      res.type('html');
                      return res.send(options.template({error: error}));
                  }
                  return res.render(options.view, {error: error});
          }
          return res.send(options.message);
      };
  }