Error handling
Carry stable application errors across server and client boundaries, report normalized failures, and retain framework-native recovery without leaking sensitive context.
Provider-independent reporting
Report scrubbed Playstack errors through an initialized Sentry client without hiding SDK configuration or instrumentation.
Visit Sentry ↗Carry stable application errors across server and client boundaries, report normalized failures, and retain framework-native recovery without leaking sensitive context.
Provider-independent reporting
@playstack/errors/sentry maps normalized severity, tags, context, opaque user and account IDs, fingerprint hints, and W3C trace metadata onto a structural Sentry client.
import { configureErrors } from '@playstack/errors'
import { sentry, sanitizeSentryEvent } from '@playstack/errors/sentry'
// Install in every SDK runtime (browser, server and edge), after any host hook:
// Sentry.init({ dsn, beforeSend: (event) => sanitizeSentryEvent(event) })
const errors = configureErrors({
drivers: [sentry(initializedSentry)],
environment: 'production',
release: 'storefront@2.4.0',
})The adapter does not initialize Sentry, resolve a DSN, configure source maps, or install automatic instrumentation. Those provider choices and the exact native client remain visible to the application.
The final beforeSend sanitizer also covers SDK-captured exceptions and inherited
metadata, not just calls through the Playstack reporter. It drops sensitive keys,
nested user/request payloads and nonopaque user IDs, and strips query/fragment
data from absolute and relative URL fields. sendDefaultPii: false alone is not
that filtering policy. Choose genuinely opaque IDs and review host-specific
data; logs, profiles, replay and attachments need separate policies.