[ux] Off-chain error humanization — wallet modal / Tiers / Trade / Swap indexer paths surface raw errors #145
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#145
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@totdking — visual / UX finding from source-level audit, assigning to you. raw error strings from non-contract layers (wallet extensions, fetch errors, indexer queries) bubble through to UI without humanization. companion to #134 which scopes contract-side errors only.
Scope
#134 covers contract-side error humanization via
humanizeTerraTxError.ts. but the off-chain layer (wallet extension errors, indexer fetch errors, mutation errors) does NOT route through the same classifier — these surface raw to users.HIGH — raw error pass-through, off-chain layer
frontend-dapp/src/components/wallet/WalletModal.tsx:65erroris read from the wallet store (useWallet.ts:45) which sets it toerr.messageor'Connection failed'. raw surfaces:Failed to enable Keplr (User rejected the request)Failed to connect Leap: Leap extension is not installed(this is the same surface visible in #139's screenshot)WalletConnect succeeded but ...frontend-dapp/src/pages/TiersPage.tsx:255-258mutation errors rendered raw. these mutation hooks may NOT route through
transactions.tsfor all branches — verify before fixing. likely surfaces includesigning rejected,fetch failed,network unreachable.frontend-dapp/src/pages/TiersPage.tsx:276-280concatenates raw fetch error message into the displayed string. surfaces include
NetworkError when attempting to fetch resource,AbortError,Failed to fetch— none humanized.frontend-dapp/src/pages/TradePage.tsx:125and:162passed straight to RetryError without humanization. same fetch-error class as Tiers above. duplicated at two render sites in the same file.
frontend-dapp/src/pages/SwapPage.tsx:167-168stored raw, then rendered at lines 745-747 in the route comparison panel.
POLISH
frontend-dapp/src/App.tsx:95, 114— ErrorBoundarygood fallback string but a render-time error stack message is surfaced directly to the user. consider hiding the raw message behind a "details" disclosure (
<details><summary>pattern) or a "report this" affordance.frontend-dapp/src/components/ui/TxResultAlert.tsx:14-16— architectural riskrenders
{message}directly with no further processing. architectural concern: humanization must happen at every CALL SITE, not in this component — there is currently no enforcement that callers pass humanized strings. any new caller will silently regress on copy. consider:TxResultAlertitself, ORerror.messagepassed toTxResultAlert'smessagepropHow to verify on local stack
For each site listed above:
make indexer-stopor just stop the container) then refresh/tiers/trade/{pair}Suggestion
extend
humanizeTerraTxError.ts(or factor a siblinghumanizeFetchError.ts/humanizeWalletError.ts) and route ALL the sites above through the same classifier shape that #134 just landed for contract errors.priority order:
Severity
P2 — UX quality. doesn't block functionality but exposes retail users to internal SDK/network jargon. compounds with the trust-signal gaps in #139/#140 where the connect modal is the user's first impression.
Cross-reference
cc @PlasticDigits
assigned to @totdking
unassigned @totdking
See comment on #144 - bugfix not a verification issue so should not be assigned to totdking
mentioned in commit
435b1cc0beImplementation landed on `main` (435b1cc)
Summary: Central off-chain error humanization (`humanizeUserFacingError.ts`) chains existing tx/LCD rules from `humanizeTerraTxError.ts` with new wallet/fetch/indexer patterns in `humanizeOffChainError.ts`. `RetryError` and `TxResultAlert` (error) apply humanization automatically; wallet connect stores humanized copy; Swap/Tiers/Trade call sites updated where needed; ErrorBoundary shows friendly copy plus collapsible Technical details.
Docs: `docs/frontend.md` § User-facing errors, `skills/AGENTS_FRONTEND_USER_ERRORS.md`, `docs/README.md` agent crosslink.
Verification checklist
/cc @brouie — please verify UX copy on the checklist above when you have a moment. Leaving this issue open until QA signs off.
mentioned in commit
cad1efa258Verification checklist
Issues noticed:
src/utils/__tests__/and notsrc/utils/testsso the test was run with the correct path and all unit tests passed with no errors or regressionOther than this, the issue is good to be closed @PlasticDigits @Brouie
mentioned in issue #706