improved error message when there is issue communicating with node
This commit is contained in:
parent
34cafc77e8
commit
517365353b
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue