Skip to content

Commit 932f48b

Browse files
author
Luca Forstner
committed
fix(nextjs): Add default option to OnUncaughtException integration
1 parent eb04258 commit 932f48b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

packages/nextjs/src/index.server.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,16 @@ function addServerIntegrations(options: NextjsOptions): void {
118118
});
119119
integrations = addOrUpdateIntegration(defaultRewriteFramesIntegration, integrations);
120120

121-
const nativeBehaviourOnUncaughtException = new Integrations.OnUncaughtException();
122-
integrations = addOrUpdateIntegration(nativeBehaviourOnUncaughtException, integrations, {
123-
_options: { exitEvenIfOtherHandlersAreRegistered: false },
121+
const nonExitingWhenOtherHandlersAreRegisteredOnUncaughtExceptionIntegration = new Integrations.OnUncaughtException({
122+
exitEvenIfOtherHandlersAreRegistered: false,
124123
});
124+
integrations = addOrUpdateIntegration(
125+
nonExitingWhenOtherHandlersAreRegisteredOnUncaughtExceptionIntegration,
126+
integrations,
127+
{
128+
_options: { exitEvenIfOtherHandlersAreRegistered: false },
129+
},
130+
);
125131

126132
if (hasTracingEnabled(options)) {
127133
const defaultHttpTracingIntegration = new Integrations.Http({ tracing: true });

0 commit comments

Comments
 (0)