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