I am doing sudo call using this example Making sudo call using subxt:
let found_event = api
.tx()
.sign_and_submit_then_watch_default(&tx, &bob)
.await?
.wait_for_finalized_success()
.await?
.has::<rococo::sudo::events::Sudid>()?;
I want to throw an error if the extrinsic fails, like in this example someone without sudo privileges (Bob) tries to do the call.
How is the best way using subxt
to submit an extrinsic to catch and parse the error?