log error on console, if api returns an error
This commit is contained in:
@ -76,6 +76,12 @@ ProviderManager.prototype.send = function(data) {
|
||||
//TODO: handle error here?
|
||||
var result = this.provider.send(data);
|
||||
result = JSON.parse(result);
|
||||
|
||||
if (result.error) {
|
||||
console.log(result.error);
|
||||
return null;
|
||||
}
|
||||
|
||||
return result.result;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user