code: function errHandler(err, req, res, next) {
    console.log(addTimestamp("Internal error: " + util.inspect(err)));
    console.error(addTimestamp("Internal error: " + util.inspect(err)));
    if (err && err.stack) {
      console.error(err.stack);
    }
  
    var errorMessage = {
      msg: 'Internal error: ' + util.inspect(err),
      error: util.inspect(err)
    };
    if (res) {
      res.statusCode = 500;
      res.end(JSON.stringify(errorMessage));
    }
  
    return errorMessage;
  }
docs: NOTE: do not change the number of parameters here. Express app requires the error handlers to have EXACTLY 4 parameters. /* eslint-disable no-unused-vars