A pure-JS package — no native modules, no pod install, no Gradle wiring. It hooks the global error handler and unhandled promise rejections. (For native crashes, run the platform SDKs alongside.)
npm install @errorgap/react-nativeIn your entry file (index.js / App.tsx):
import { Errorgap } from "@errorgap/react-native";
import { Platform } from "react-native";
Errorgap.init({
endpoint: "https://your-endpoint",
projectSlug: "your-project",
apiKey: "flk_...",
environment: __DEV__ ? "development" : "production",
deviceInfo: {
os_name: Platform.OS,
os_version: String(Platform.Version),
},
});The SDK hooks ErrorUtils.setGlobalHandler and unhandled promise rejections automatically.
<Button title="Test Errorgap" onPress={() => { throw new Error("Errorgap test error"); }} />Confirm your key and endpoint reach errorgap before wiring anything else — send one event straight to the ingestion API:
curl -sS -X POST "$ERRORGAP_ENDPOINT/api/projects/$ERRORGAP_PROJECT_SLUG/notices" \
-H "content-type: application/json" \
-H "x-errorgap-project-key: $ERRORGAP_API_KEY" \
-d '{"errors":[{"type":"ErrorgapInstallTest","message":"Errorgap install verification"}]}'A 201 with a group_id means ingestion works (202 = received but sampled; 401 = wrong key). Then trigger the test error above through the SDK. Your onboarding screen's Verify step checks the stack off automatically once the first event lands — it polls every three seconds.
Next: the full ingestion API, or browse every SDK.