Utilty to build response callbacks
function responseCallback(req, res) {
    return function(err, data) {
      if (err) {
        handleError(err, req, res);
      } else {
        res.send(data);
      }
    };
  }