Comparing version 0.1.2 to 0.2.0
@@ -172,7 +172,10 @@ (function(root, factory) { | ||
return this._send( | ||
{meta: meta, data: _.extend({result: 'SUCCESS'}, data)} | ||
{meta: _.extend({result: 'SUCCESS'}, meta), data: data} | ||
); | ||
}.bind(this)).catch(function(error) { | ||
return this._send( | ||
{meta: meta, data: {result: 'FAILURE', reason: error}} | ||
{ | ||
meta: _.extend({result: 'FAILURE', reason: error}, meta), | ||
data: data | ||
} | ||
); | ||
@@ -215,8 +218,8 @@ }.bind(this)); | ||
// successful. | ||
HelpEsb.Client.prototype._checkRpcResult = function(response) { | ||
if (response.result !== 'SUCCESS') { | ||
return Promise.reject(response); | ||
HelpEsb.Client.prototype._checkRpcResult = function(data, meta) { | ||
if (meta.result !== 'SUCCESS') { | ||
return Promise.reject(meta.reason); | ||
} | ||
return Promise.resolve(response); | ||
return Promise.resolve(data); | ||
}; | ||
@@ -223,0 +226,0 @@ |
{ | ||
"name": "help-esb", | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"description": "A client for the Help.com team's ESB.", | ||
@@ -5,0 +5,0 @@ "main": "help-esb.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20510
311