Skip to content

Add app-wide error boundary and crash fallback #32

Description

@Lakes41

Difficulty: Advanced

Type: Bug

Summary

Add an app-wide error boundary so unexpected rendering errors show a safe recovery screen instead of leaving users stuck or crashing without context.

Current Behaviour

Screens use query loading and error states, but there is no visible global React error boundary for unexpected component errors.

Expected Behaviour

Unexpected UI failures should render a safe fallback with options to retry, reset local state, or return to onboarding.

Suggested Implementation

Add an Expo Router-compatible error boundary or root-level React error boundary. Log non-sensitive error details in development and optionally expose a reporting hook for production integrations.

Files or Areas Likely Affected

  • app/_layout.tsx
  • app/+not-found.tsx
  • src/components/
  • src/lib/errorReporting/
  • tests/
  • README.md

Acceptance Criteria

  • Unexpected render errors show a fallback screen
  • Users can retry or return to a safe route
  • Reset action clears local app state where appropriate
  • Sensitive values such as wallet data are not logged unnecessarily
  • Tests cover the fallback rendering path
  • Documentation explains development and production error behaviour

Additional Notes

Avoid adding a third-party error reporting service unless maintainers approve it. Provide a local abstraction first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

    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