A contract error can be technically precise and still leave a user unsure what to do. The interface must distinguish several moments: preparing an action, requesting approval, submitting it, waiting for evidence and observing the final result. Each has different failure possibilities. Design these states alongside the contract's error model so a user receives an accurate explanation rather than a generic failure banner at every interruption.

Separate wallet decisions from contract outcomes

A user declining a wallet request is not the same as a submitted transaction reverting. A connection problem before submission is different again. Record the stage and show a message that matches what is known. Avoid claiming that nothing happened when the application lost contact after submission. Preserve any available transaction reference and offer a supported way to check it. This state model prevents repeated attempts caused by uncertainty and gives support enough context to distinguish an intentional cancellation from a technical issue requiring investigation.

Define actionable error categories

Group expected failures by the decision the user can make: insufficient eligibility, expired offer, unsupported input or temporarily unavailable feature. Keep the underlying technical detail accessible for diagnostics without forcing everyone to interpret it. Solidity's ABI includes error descriptions, but the application still needs a maintained mapping to product language. Do not expose raw internal messages that reveal unnecessary details or confuse the audience. An error message should explain the relevant condition and next step, while avoiding certainty about causes the system has not actually established.

Show pending work honestly

After submission, indicate that confirmation is awaited and explain whether the user can leave and return. Persist enough local or account state to resume the same operation. A loading animation without context can encourage a second action that competes with the first. If a transaction is replaced or another supported mechanism changes its tracking reference, update the view coherently. The exact handling depends on the wallet and network, so verify the intended integration rather than assuming a single transaction identifier always tells the full product story.

Test recovery through the entire interface

Reproduce a rejected request, an expected contract error, delayed confirmation and a browser refresh after submission. Include a successful operation whose display indexer is late. Ask testers what they believe happened and what they would do next. Their answer matters as much as whether the error component rendered. Compare the interface state with the operational record so support sees the same story. A retry control should have clear semantics and should not silently create a new purchase or claim when checking an existing one would be appropriate.

Maintain messages with contract changes

When an error or business rule changes, update the interface mapping and support guidance in the same release. Track unrecognised failures and repeated retries to find gaps in the model. Avoid treating every new error as a reason to add another paragraph; often the workflow or preflight check needs improvement. A good failure experience helps users act on what is known and wait when action is unnecessary. That clarity makes a technically complex system feel dependable without pretending every transaction is instant or every failure is recoverable.

TAKE IT FORWARD

The key decisions.

  • After submission, indicate that confirmation is awaited and explain whether the user can leave and return.
  • Reproduce a rejected request, an expected contract error, delayed confirmation and a browser refresh after submission.
  • When an error or business rule changes, update the interface mapping and support guidance in the same release.

Sources & further reading

Primary references for the concepts discussed. Check the applicable documentation when planning implementation.

  1. Solidity ABI and error specification