Bugsnag Adapter
Send captured errors to Bugsnag.
Install
yarn add @bugsnag/js
Activate
import { initialize, useAdapter } from 'unified-error-handling';
initialize();
await useAdapter('bugsnag', {
apiKey: 'your-api-key',
releaseStage: 'production',
});
Config
| Field | Purpose |
|---|---|
apiKey | Your Bugsnag API key (required). |
releaseStage | Environment label (e.g. production, staging). |
The adapter dynamically imports @bugsnag/js, starts it with your config, and forwards each captured error.
Notes
- If
@bugsnag/jsis not installed, activation throwsFailed to load Bugsnag SDK…with the original import error preserved ascause. - Pass any additional Bugsnag start options your project needs in the same config object.