Skip to content

Add proper error states with retry functionality #125

Description

@therealjhay

Description: Currently, if data fails to load (e.g., API is down, network error), the app either shows mock data silently or shows a generic toast. Each data-dependent section should have a dedicated error state with a "Retry" button and a helpful message.

Requirements:

  • Create an ErrorDisplay component with: error icon, message, and "Try Again" button
  • Add error state handling to: dashboard stat cards, transactions table, payment links list, wallet balances, settlement history, FX rates
  • Use React Query's isError state if applicable, or manual error state management
  • The retry button should re-trigger the data fetch
  • Show a subtle message, not a full-page takeover

Suggested execution steps:

  1. Create components/shared/ErrorDisplay.tsx with message, onRetry props
  2. In the wallet page, add error state: if refreshBalances fails, show ErrorDisplay in place of balances
  3. In the transactions page, add error state: show ErrorDisplay in the table body
  4. In the dashboard, add error boundary around each section
  5. Use consistent amber/slate styling for the error display

Example commit message:

feat(ux): add error states with retry buttons to all data-dependent sections

Created ErrorDisplay component with icon, message, and "Try Again" button.
Added error handling to wallet balances, transactions table, payment links,
settlement history, and FX rates. Sections now gracefully degrade instead
of failing silently or showing stale mock data.

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

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