mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 22:44:45 +00:00
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;
|
const value = await result;
|
||||||
cb(null, value);
|
cb(null, value);
|
||||||
} catch (error) {
|
} 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);
|
cb(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user