polkadot API on network callback better error handling
this example will fail on TS because the TS is not recognising the types https://polkadot.js.org/docs/api/cookbook/tx/#how-do-i-get-the-decoded-enum-for-an-extrinsicfailed-event
make sure that it is executed properly, also make sure you write the proper tests