GlobalHandlers | Sentry for Next.js
Source URL: https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/integrations/globalhandlers
GlobalHandlers | Sentry for Next.js
Section titled “GlobalHandlers | Sentry for Next.js”This integration only works in the Browser and Deno runtimes.
Import name: Sentry.globalHandlersIntegration
This integration is enabled by default. If you’d like to modify your default integrations, read this.
This integration attaches global handlers to capture uncaught exceptions and unhandled rejections. It captures errors and unhandled promise rejections by default.
Sentry.init({ integrations: [Sentry.globalHandlersIntegration({ onerror: true, onunhandledrejection: true })],});Type: boolean
Capture errors bubbled to onerror.
Type: boolean
Capture unhandled promise rejections.