PostHog Error Tracking Emulator

Throws a synchronous error that should be automatically captured by PostHog's exception autocapture.

Manually captures an error using posthog.captureException() with custom properties.

Throws an asynchronous error that should be automatically captured by PostHog's exception autocapture.

Tests server-side error handling by calling an API endpoint that throws an error.

Triggers the React error boundary (like the retry button in error.tsx) to test error boundary error capture.

Test Results:

No tests run yet

Instructions:

Click the test buttons above, then check your PostHog dashboard for $exception events. Look for events with properties like "testType" and "errorBoundary" to verify error tracking is working.

Error.tsx Preview:

This is how an error from the error.tsx file would look like when triggered:

Click the button below to see the actual Error component:

Features:

  • Captures error with PostHog including error digest and timestamp
  • Uses consistent styling with the app's design system
  • Triggers when React error boundaries catch unhandled errors
v1.4.0