What problem does it solve?
Provides a consistent, production-grade approach to catching, logging, and responding to errors across server routes and client UI so crashes are contained, diagnostics are reliable, and user-facing failures remain graceful.
Core Features & Use Cases
- Standardized server helpers for unexpected and known errors: logAndSendError for 500-level failures and sendError for validation and not-found responses.
- Validation handling pattern using Zod with readable fromZodError messages for client-friendly 400 responses.
- Non-blocking side effects via fire-and-forget logging that never breaks the primary request flow.
- Client error boundaries including a top-level ErrorBoundary, a SelfHealingBoundary with exponential backoff, and a FinancialErrorBoundary tailored to calculation components.
- FinancialCalculationError class with deterministic input hashing and Sentry tag helpers to deduplicate and contextualize engine failures.
- Sentry integration configured for graceful degradation, environment-specific sampling, and safe client reporting.
- Rules and checklist enforcing typed catch blocks, no empty catch swallowing, and placement of boundaries and helpers across the app.
Quick Start
Wrap server route handlers with logAndSendError for unexpected failures and add FinancialErrorBoundary around calculation UIs while using SelfHealingBoundary for transient async sections.