React Native SDK
Install @errtap/react-native to capture uncaught JavaScript errors in React Native and Expo apps via the global ErrorUtils handler.
Install
npm i @errtap/react-nativeThe SDK hooks React Native's global ErrorUtils handler for uncaught JS errors and forwards
them to ErrTap, then hands off to the previous handler.
Initialise
Call init once, as early as possible in your entry file:
// App.tsx (or index entry — call once at startup)
import { init } from '@errtap/react-native';
init({
dsn: process.env.EXPO_PUBLIC_ERRTAP_DSN!, // https://et_…@host
environment: __DEV__ ? 'development' : 'production',
release: '1.0.0',
});With Expo, expose the DSN through an EXPO_PUBLIC_-prefixed env var. DSN keys are
write-only, so shipping one in the app binary is by design.
Manual capture & logs
import { captureException, captureMessage, logger } from '@errtap/react-native';
logger.info('checkout started');
try {
await pay();
} catch (e) {
captureException(e as Error, { tags: { screen: 'Checkout' } });
throw e;
}Options
| Field | Type | Description |
|---|---|---|
dsn | string | URL DSN (https://et_…@host) or bare key (requires endpoint) |
endpoint | string | Override ingest URL; optional when dsn is a URL DSN |
environment | string | e.g. production, development |
release | string | App version — ties errors to a release |
tags | Record<string, unknown> | Attached to every event |