Human-readable revert reasons. elm-web3 can decode Error(string)
revert data (Web3.Abi.Decode.decodeRevertReason) — this module is the
missing last mile that actually shows it to the user instead of a raw
0x08c379a0… blob.
case model.txError of
Just raw ->
Revert.banner [] { onDismiss = Just DismissError } raw
Nothing ->
Html.text ""Decoding is best-effort and honest about it: a decodable Error(string)
payload renders its message; anything else (custom solc errors, empty
reverts, out-of-gas) renders a labelled fallback with the truncated selector
so the information is preserved, never invented.
CSS classes: web3-revert, web3-revert--decoded, web3-revert--raw,
web3-revert__reason, web3-revert__dismiss, web3-revert-toast.
The same content shaped for a toast/notification stack.
Extract the best human-readable string from raw revert data.
Ok message when it decoded as Error(string); Err shortForm (a
truncated hex selector, or the raw input for non-hex strings) when it
did not.
An inline error banner (
role="alert"— screen readers announce it). PassonDismiss = Just msgto get a dismiss button.