Adding error messages

This commit is contained in:
Richard Ramos 2018-06-11 16:35:42 -04:00
parent 38e6a9571d
commit 03483052ea
2 changed files with 5 additions and 1 deletions

View File

@ -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;
}

View File

@ -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]){