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