Skip to main content
Bumped by Community user
explain more
Source Link
maroodb
  • 1.1k
  • 1
  • 10
  • 34

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 ... ?
  })

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

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 ... ?
  })
Source Link
maroodb
  • 1.1k
  • 1
  • 10
  • 34

How to know if transaction is failed due to insufficient balance?

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