Skip to content

Commit 9ee8190

Browse files
Update packages/remix/src/utils/instrumentServer.ts
Co-authored-by: Abhijeet Prasad <aprasad@sentry.io>
1 parent 075de70 commit 9ee8190

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/remix/src/utils/instrumentServer.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { captureException, configureScope, getCurrentHub, startTransaction } from '@sentry/node';
1+
import { captureException, getCurrentHub, startTransaction } from '@sentry/node';
22
import { getActiveTransaction } from '@sentry/tracing';
33
import { addExceptionMechanism, fill, loadModule, logger, stripUrlQueryAndFragment } from '@sentry/utils';
44

@@ -70,7 +70,7 @@ interface DataFunction {
7070
}
7171

7272
function captureRemixServerException(err: Error, name: string): void {
73-
configureScope(scope => {
73+
captureException(err, scope => {
7474
scope.addEventProcessor(event => {
7575
addExceptionMechanism(event, {
7676
type: 'instrument',
@@ -82,9 +82,9 @@ function captureRemixServerException(err: Error, name: string): void {
8282

8383
return event;
8484
});
85-
});
8685

87-
captureException(err);
86+
return scope;
87+
});
8888
}
8989

9090
function makeWrappedDocumentRequestFunction(

0 commit comments

Comments
 (0)