code: function (req, res) {
          return function (err) {
              if (err) {
                  res.writeHead(500);
                  res.end(err.toString());
              } else {
                  res.writeHead(404);
                  res.end();
              }
          };
      }
docs: A handler for calling the next middleware module if for some reason one isn't provided.
  
  @param {Error} err An error, if it occurred.
  @api private