Skip to content

Improve user-facing error messages for clarity#95

Open
SLC-BTC wants to merge 1 commit intoBlockstream:masterfrom
SLC-BTC:improve-error-messages
Open

Improve user-facing error messages for clarity#95
SLC-BTC wants to merge 1 commit intoBlockstream:masterfrom
SLC-BTC:improve-error-messages

Conversation

@SLC-BTC
Copy link
Copy Markdown

@SLC-BTC SLC-BTC commented Apr 9, 2026

Summary

  • Rewrites ~50 cryptic/technical error messages across the string catalog and Swift code to use plain language with actionable guidance
  • Replaces hardcoded English strings in Error.swift, Lwk.swift, SendFlowError.swift, and BleLedgerConnection.swift with proper id_ localization keys
  • Eliminates internal error names leaking to users (e.g. "Poison Error", "Object Consumed", "Magic Routing Hint", "Reconnect Error", "Session Error")
  • Fixes grammar issues ("Could not recognized" → "Could not recognize")
  • Tones down alarming hardware wallet error message about compromise
  • Adds 8 new localization keys for previously unlocalized error strings

Examples of changes

Before After
"Operation failure" "Something went wrong. Please try again or contact support if the issue persists."
"Poison Error {msg}" "An internal error occurred. Please try again or contact support."
"Object Consumed" "An internal error occurred. Please restart the app and try again."
"Reconnect Error" "Connection was interrupted. Please check your internet and try again."
"Could not recognized QR code" "Could not recognize this QR code. Please try scanning again."
"Invalid mnemonic" "The recovery phrase you entered is not valid. Please check and try again."
"Insufficient funds" "You don't have enough funds for this transaction."

Companion PR: Blockstream/green_android (same branch name)

Test plan

  • Verify app builds successfully with no missing string key references
  • Exercise key error paths: wrong PIN, invalid address, disconnect hardware wallet, timeout scenarios
  • Confirm new error messages render correctly in alert dialogs and toast notifications
  • Non-English translations are unchanged and will need a separate translation pass

🤖 Generated with Claude Code

Rewrite ~50 error messages across the string catalog and code to use
plain language, provide actionable guidance, and eliminate cryptic
technical jargon. Key changes:

- Replace generic messages like "Operation failure", "Failed", "Timeout"
  with explanations of what went wrong and what to do next
- Fix grammar issues ("Could not recognized" -> "Could not recognize")
- Replace hardcoded English strings in Error.swift, Lwk.swift,
  SendFlowError.swift, and BleLedgerConnection.swift with localization
  keys so they can be properly translated
- Eliminate internal error names leaking to users ("Poison Error",
  "Object Consumed", "Magic Routing Hint", "Reconnect Error")
- Tone down alarming hardware wallet error messages
- Add 8 new localization keys for previously unlocalized error strings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant