I want to know if it is possible to know from "error" object returned by geth that the error it was due to insufficient balance (something to compare with)
I have a js code like that:
mycontract.storeData("some-data")
.then(res => {
// transaction confirmed
})
.catch(error => {
// I want to know the cause if the error (programmatically) like error.statusCode ... ?
})
console.log(error)
and share it with us! BTW, there's no way to tell if the error was due to insufficient balance, but there IS a way to deduce the answer to that questions from theerror
object along with the current balance of your account.