From 03483052ea625c6037857ba6f3c520602fae43c8 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Mon, 11 Jun 2018 16:35:42 -0400 Subject: [PATCH] Adding error messages --- lib/core/proxy.js | 1 + lib/modules/console_listener/index.js | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/core/proxy.js b/lib/core/proxy.js index 71e2a95a..ebac2faa 100644 --- a/lib/core/proxy.js +++ b/lib/core/proxy.js @@ -30,6 +30,7 @@ exports.serve = function(ipc, host, port, ws){ try { jsonO = JSON.parse(resBody); } catch(e) { + console.log(__("Cannot parse node response")); return; } diff --git a/lib/modules/console_listener/index.js b/lib/modules/console_listener/index.js index 64f02dc8..e5c8874d 100644 --- a/lib/modules/console_listener/index.js +++ b/lib/modules/console_listener/index.js @@ -18,7 +18,10 @@ class ConsoleListener { _updateContractList(){ this.events.request("contracts:list", (_err, contractsList) => { - if(_err) return; + if(_err) { + this.logger.error(__("no contracts found")); + return; + } contractsList.forEach(contract => { let address = contract.deployedAddress.toLowerCase(); if(!this.addressToContract[address]){