Skip to main content

Raygun Adapter

Send captured errors to Raygun crash reporting.

Install

yarn add raygun4js

Activate

import { initialize, useAdapter } from 'unified-error-handling';

initialize();

await useAdapter('raygun', {
apiKey: 'your-api-key',
});

Config

FieldPurpose
apiKeyYour Raygun API key (required).

The adapter dynamically imports raygun4js, initializes it with your API key, and forwards each captured error.

Notes

  • If raygun4js is not installed, activation throws Failed to load Raygun SDK… with the original import error preserved as cause.
  • Combine with breadcrumbs and setUser() for richer crash reports — the adapter forwards both when supported.