File tree 2 files changed +7
-0
lines changed
2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,11 @@ function addServerIntegrations(options: NextjsOptions): void {
118
118
} ) ;
119
119
integrations = addOrUpdateIntegration ( defaultRewriteFramesIntegration , integrations ) ;
120
120
121
+ const nativeBehaviourOnUncaughtException = new Integrations . OnUncaughtException ( ) ;
122
+ integrations = addOrUpdateIntegration ( nativeBehaviourOnUncaughtException , integrations , {
123
+ _options : { exitEvenIfOtherHandlersAreRegistered : false } ,
124
+ } ) ;
125
+
121
126
if ( hasTracingEnabled ( options ) ) {
122
127
const defaultHttpTracingIntegration = new Integrations . Http ( { tracing : true } ) ;
123
128
integrations = addOrUpdateIntegration ( defaultHttpTracingIntegration , integrations , {
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { logAndExitProcess } from './utils/errorhandling';
7
7
8
8
type OnFatalErrorHandler = ( firstError : Error , secondError ?: Error ) => void ;
9
9
10
+ // CAREFUL: Please think twice before updating the way _options looks because the Next.js SDK depends on it in `index.server.ts`
10
11
interface OnUncaughtExceptionOptions {
11
12
// TODO(v8): Evaluate whether we should switch the default behaviour here.
12
13
// Also, we can evaluate using https://nodejs.org/api/process.html#event-uncaughtexceptionmonitor per default, and
@@ -48,6 +49,7 @@ export class OnUncaughtException implements Integration {
48
49
*/
49
50
public readonly handler : ( error : Error ) => void = this . _makeErrorHandler ( ) ;
50
51
52
+ // CAREFUL: Please think twice before updating the way _options looks because the Next.js SDK depends on it in `index.server.ts`
51
53
private readonly _options : OnUncaughtExceptionOptions ;
52
54
53
55
/**
You can’t perform that action at this time.
0 commit comments