index.js
function _extractEmptyResponse(xml, dfrd) {
  var parser = new xml2js.Parser();
  parser.parseString(xml, function(err, res) {
    if (err) {
      dfrd.reject();
      return MODULE_ERRORS.xmlParseError;
    }
    if (res.response.error) {
      dfrd.reject(res.response.error);
    }
  });
}
function _extractEmptyResponse(xml, dfrd) {
  var parser = new xml2js.Parser();
  parser.parseString(xml, function(err, res) {
    if (err) {
      dfrd.reject();
      return MODULE_ERRORS.xmlParseError;
    }
    if (res.response.error) {
      dfrd.reject(res.response.error);
    }
  });
}
function _extractEmptyResponse ( xml , dfrd ) { var parser = new xml2js . Parser ( ) ; parser . parseString ( xml , function ( err , res ) { if ( err ) { dfrd . reject ( ) ; return MODULE_ERRORS . xmlParseError ; } if ( res . response . error ) { dfrd . reject ( res . response . error ) ; } } ) ; }
Basically just asserts an empty response has no errors in it.
@param {string} xml XML to parse
@param {Q.defer} dfrd Q deferred object
Basically just asserts an empty response has no errors in it .