From 517365353bd9cdc14979cd003a0256f1945c5aca Mon Sep 17 00:00:00 2001 From: Evgeniy Filatov Date: Tue, 2 Oct 2018 02:01:08 +0300 Subject: [PATCH] improved error message when there is issue communicating with node --- lib/core/modules/coderunner/codeRunner.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/core/modules/coderunner/codeRunner.js b/lib/core/modules/coderunner/codeRunner.js index a00db4b1..2761319d 100644 --- a/lib/core/modules/coderunner/codeRunner.js +++ b/lib/core/modules/coderunner/codeRunner.js @@ -93,6 +93,11 @@ class CodeRunner { const value = await result; cb(null, value); } catch (error) { + // Improve error message when there's no connection to node + if (error.message.indexOf('Invalid JSON RPC response') !== -1) { + error.message += '. Are you connected to an Ethereum node?'; + } + cb(error); } }