aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarek Kotewicz <marek.kotewicz@gmail.com>2015-01-28 07:07:03 +0800
committerMarek Kotewicz <marek.kotewicz@gmail.com>2015-01-28 07:07:03 +0800
commit1345a8c67c41a31847c0dea23a7e7904bf25779a (patch)
tree00e38b5da7732f80c04825b1b29a61bd9733ad3b /lib
parent83fad0fb594ca120eb979d4d643be96c26553a6f (diff)
downloaddexon-1345a8c67c41a31847c0dea23a7e7904bf25779a.tar.gz
dexon-1345a8c67c41a31847c0dea23a7e7904bf25779a.tar.zst
dexon-1345a8c67c41a31847c0dea23a7e7904bf25779a.zip
log error on console, if api returns an error
Diffstat (limited to 'lib')
-rw-r--r--lib/providermanager.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/providermanager.js b/lib/providermanager.js
index 1a550e5f4..25cd14288 100644
--- a/lib/providermanager.js
+++ b/lib/providermanager.js
@@ -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;
};