Skip to content

Frontend Issue: Improve Web3 Transaction Error Handling #240

@godwinameh

Description

@godwinameh

Summary:

Web3 transaction errors currently show generic messages. Add user-friendly error handling for common wallet and blockchain transaction failures in the Next.js frontend.

Errors to Handle
4001 → User rejected transaction
-32603 → Internal JSON-RPC error
INSUFFICIENT_FUNDS → Not enough ETH for gas
UNPREDICTABLE_GAS_LIMIT → Transaction will fail
NETWORK_ERROR → RPC connection failed

Requirements
Create a reusable error handler utility
Show clear toast or alert messages
Prevent raw blockchain errors from appearing in the UI
Add fallback handling for unknown errors

Acceptance Criteria
Users see friendly error messages
Unknown errors show a generic fallback message
Error handling works across all transaction flows
Fully reusable and typed with TypeScript

Tech Stack
Next.js
TypeScript
Web3 / Ethers.js / Viem

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions