Skip to content

feat: implement user-friendly transaction error messages#1265

Open
radik878 wants to merge 8 commits intonounsDAO:masterfrom
radik878:friendlymessage
Open

feat: implement user-friendly transaction error messages#1265
radik878 wants to merge 8 commits intonounsDAO:masterfrom
radik878:friendlymessage

Conversation

@radik878
Copy link

Replace verbose blockchain transaction error messages with concise, localized user-friendly alternatives.

Changes

  • Add centralized error formatting utility in utils/txErrorMessages.ts
  • Map common wallet/provider errors to readable messages:
    • User rejection → "Transaction canceled."
    • Insufficient funds → "Insufficient funds to complete this transaction."
    • Gas issues → "Replacement fee too low; try again with higher gas."
    • Contract reverts → Contextual messages (e.g., "You have already voted")
  • Integrate error formatter across key transaction flows:
    • Vote page (queue/execute/cancel proposals)
    • Candidate page (cancel candidates)
    • Create/Edit Candidate pages (proposal submission)
    • Edit Proposal pages (updates and transactions)
    • VoteModal (voting failures)
    • Bid component (auction transactions)

Benefits

  • Improves user experience by showing clear, actionable error messages
  • Reduces confusion from technical blockchain error strings
  • Maintains i18n support with Lingui macros
  • Centralizes error handling for consistent messaging

Fixes #1062

@vercel
Copy link

vercel bot commented Aug 23, 2025

@radik878 is attempting to deploy a commit to the Nouns Team on Vercel.

A member of the Team first needs to authorize it.

@volkyeth
Copy link
Member

Thanks a lot for this!

We're in the middle of a migration to nextjs (#1260), so I'll wait until that is done so we can rebase your work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Friendly transaction error messages

2 participants