Extract a human-readable error from a transaction result's dispatch error.
PAPI dispatch errors for pallet modules are nested: { type: "Module", value: { type: "Revive", value: { type: "ContractReverted" } } }
{ type: "Module", value: { type: "Revive", value: { type: "ContractReverted" } } }
This walks the chain to build a string like "Revive.ContractReverted".
"Revive.ContractReverted"
A transaction result with ok and optional dispatchError.
ok
dispatchError
A human-readable error string, or "" if the result is ok, or "unknown error" if the dispatch error cannot be decoded.
""
"unknown error"
Extract a human-readable error from a transaction result's dispatch error.
PAPI dispatch errors for pallet modules are nested:
{ type: "Module", value: { type: "Revive", value: { type: "ContractReverted" } } }This walks the chain to build a string like
"Revive.ContractReverted".