Commit 1345a8c6 authored by Marek Kotewicz's avatar Marek Kotewicz

log error on console, if api returns an error

parent 83fad0fb
...@@ -783,6 +783,12 @@ ProviderManager.prototype.send = function(data) { ...@@ -783,6 +783,12 @@ ProviderManager.prototype.send = function(data) {
//TODO: handle error here? //TODO: handle error here?
var result = this.provider.send(data); var result = this.provider.send(data);
result = JSON.parse(result); result = JSON.parse(result);
if (result.error) {
console.log(result.error);
return null;
}
return result.result; return result.result;
}; };
......
This diff is collapsed.
This diff is collapsed.
...@@ -76,6 +76,12 @@ ProviderManager.prototype.send = function(data) { ...@@ -76,6 +76,12 @@ ProviderManager.prototype.send = function(data) {
//TODO: handle error here? //TODO: handle error here?
var result = this.provider.send(data); var result = this.provider.send(data);
result = JSON.parse(result); result = JSON.parse(result);
if (result.error) {
console.log(result.error);
return null;
}
return result.result; return result.result;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment