Problem
When attempting to purchase a postage stamp without sufficient xBZZ/xDAI funds, the UI displays a generic red popup with an unhelpful error message like "error 40x" (HTTP status code).
This provides no actionable information to the user about:
- What went wrong
- Why it failed
- How to fix it
Expected Behavior
The error message should be user-friendly and actionable:
Example improved messages:
- "Insufficient xBZZ balance to purchase stamp. You need X xBZZ but only have Y. [Add funds]"
- "Insufficient xDAI for gas fees. You need approximately X xDAI. [Add funds]"
- "Transaction failed: Not enough funds in wallet 0x... to complete stamp purchase."
Current Behavior
- Red popup appears with generic "Error 40x" or similar HTTP status code
- No indication that the issue is related to wallet balance
- User has to guess what went wrong
Suggested Improvements
-
Parse API error responses - The Bee API returns structured error messages. Parse and display these in human-readable form.
-
Check balances before attempting purchase - Validate wallet has sufficient funds before sending the transaction, and show a clear message if not.
-
Contextual error messages - Map common error scenarios to helpful messages:
- Insufficient xBZZ → "Need more xBZZ for stamp"
- Insufficient xDAI → "Need more xDAI for gas"
- RPC error → "Blockchain connection issue"
- Stamp depth/amount invalid → Specific validation message
-
Include "next steps" - Each error should suggest what the user can do (e.g., link to faucet, show wallet address to fund, etc.)
Environment
- Swarm Desktop version: 2.6.0
- OS: macOS
Problem
When attempting to purchase a postage stamp without sufficient xBZZ/xDAI funds, the UI displays a generic red popup with an unhelpful error message like "error 40x" (HTTP status code).
This provides no actionable information to the user about:
Expected Behavior
The error message should be user-friendly and actionable:
Example improved messages:
Current Behavior
Suggested Improvements
Parse API error responses - The Bee API returns structured error messages. Parse and display these in human-readable form.
Check balances before attempting purchase - Validate wallet has sufficient funds before sending the transaction, and show a clear message if not.
Contextual error messages - Map common error scenarios to helpful messages:
Include "next steps" - Each error should suggest what the user can do (e.g., link to faucet, show wallet address to fund, etc.)
Environment