Unified Error Handling — other project

Unified Error Handling is an open-source (MIT) TypeScript library that gives any JavaScript app a single, consistent API to capture, enrich, and route errors to ten monitoring services — Sentry, Firebase Crashlytics, Datadog, Bugsnag, Rollbar, LogRocket, Raygun, AppCenter, console, and custom adapters. The core has zero runtime dependencies and stays around 7 KB brotli because each provider's heavyweight SDK is loaded on demand via dynamic import, so apps only ship the monitoring they enable. It works in browsers, Node.js, and React Native, and an optional React entry adds provider-less error boundaries, hooks, and HOCs with no context wiring. Switching monitoring vendors becomes a one-line adapter swap instead of a codebase rewrite — observability that follows the team, not the vendor. Dual ESM/CJS with conditional exports and a 33-test Vitest suite.

Tech stack

  • TypeScript
  • React
  • esbuild
  • Vitest

Key features

  • One API for 10 error-monitoring providers
  • Zero runtime dependencies (~7 KB brotli core)
  • Dynamic import() adapter loading
  • Provider-less React error boundary + hooks + HOCs
  • One-line vendor swap (no app code change)
  • Offline error queueing
  • Dual ESM + CJS with conditional exports

Category: other · Status: completed · Started: 2024-06 · Through: Present · Client: Open Source

Links: https://npmjs.com/package/unified-error-handling · https://github.com/aoneahsan

Tags: npm · package · error-handling · observability · typescript · zero-dependencies


Contact

Website: https://zaions.com
Email: aoneahsan@gmail.com
GitHub: github.com/aoneahsan
LinkedIn: linkedin.com/in/aoneahsan
RSS Feed: https://zaions.com/feed.xml
Sitemap: https://zaions.com/sitemap.xml
LLM Index: https://zaions.com/llms.txt