How to get ERROR message from flow emulator?

I was using this piece of code to determine when the transaction is completed on the frontend.

After the transaction is completed I’m getting this

However, the execution failed because of the difference in types

Is there any way to read these errors directly ?

1 Like

tagging @qvvg

Morning @jayesh_wayesh,

The txStatus has a couple things in it. Including an a statusCode (which if its non-zero means something went wrong) and an errorMessage (which sounds closer to what you are looking for). We get these values directly from the Access Node. Frustratingly this might not even be what you are looking for, but we definitely feel your pain, and are actively working on making this better. In the mean time statusCode and errorMessage are probably the way to go.


Thanks, @qvvg :raised_hands:
I can totally work with that!

@jayesh_wayesh also be aware that I am currently working on making the fcl.tx(resp).once* family of functions throw an error if they receive a non-zero status code.

To keep things backwards compatible this will probably be enabled via a flag. Feel free to leave any comments or concerns in the issue, we will definitely see them.


Sure @qvvg . :raised_hands: