Skip to content

Report ErrorBoundary-caught errors through a logging/reporting hook #38

Closed

Description

@priscaenoch

Problem

src/components/ErrorBoundary.tsx catches render errors in componentDidCatch and only calls console.error("[ErrorBoundary]", error, info.componentStack). In production this means a crash that takes out part of the UI is invisible to the team: there is no structured logging, no reporting hook, and the raw error is written to the end user's console.

What needs to be done

  • Route caught errors through a small reporting abstraction (a function/hook) so a real reporting backend can be plugged in later, defaulting to a no-op or structured console call in development.
  • Include useful context (component stack, route) in the report.
  • Avoid leaking internal error details to the end-user console in production builds; keep the user-facing fallback UI.
  • Ensure the abstraction is easy to mock in tests.

Files

  • src/components/ErrorBoundary.tsx
  • new src/services/reporting.ts (or similar)

Acceptance deliverables

  • Caught errors are sent to a pluggable reporting hook with context, not just console.error.
  • Production builds do not dump raw error details to the user console.
  • All CI checks pass; the change cannot be merged until CI is green.

Tests to pass

  • Test: when a child throws, the reporting hook is invoked with the error and component stack (hook mocked).
  • Test: the fallback UI still renders after an error.

Activity

  1. Ayinkx01 commented on Aug 18, 2026

    @Ayinkx01

    Hi i would like to work on this issue please assign to me
    I can do it perfectly

  2. adewuyito commented on Aug 24, 2026

    @adewuyito
    Contributor

    Allow me work on this issue

  3. grantfox-oss commented on Aug 26, 2026

    @grantfox-oss

    🦊 GrantFox — @adewuyito has been assigned to this issue as part of the Third Campaign campaign!

    Next steps:

    1. Open a Pull Request referencing this issue (e.g., Closes #38)
    2. Your PR will be reviewed by the octraban maintainers

    Good luck! Track your progress on GrantFox.

  4. added a commit that references this issue on Aug 30, 2026
    2770d06
  5. grantfox-oss commented on Aug 30, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox as part of the Third Campaign campaign!

    @adewuyito's PR #46 was approved and merged by @priscaenoch.

    🏆 @adewuyito: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (271 total points). Track your full progress on GrantFox.

    👏 Great work, @adewuyito! Keep contributing to octraban.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third CampaignenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions