Skip to content

Commit

Permalink
Update packages/remix/src/utils/instrumentServer.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Abhijeet Prasad <aprasad@sentry.io>
  • Loading branch information
onurtemizkan and AbhiPrasad committed Jul 8, 2022
1 parent 075de70 commit 9ee8190
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/remix/src/utils/instrumentServer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { captureException, configureScope, getCurrentHub, startTransaction } from '@sentry/node';
import { captureException, getCurrentHub, startTransaction } from '@sentry/node';
import { getActiveTransaction } from '@sentry/tracing';
import { addExceptionMechanism, fill, loadModule, logger, stripUrlQueryAndFragment } from '@sentry/utils';

Expand Down Expand Up @@ -70,7 +70,7 @@ interface DataFunction {
}

function captureRemixServerException(err: Error, name: string): void {
configureScope(scope => {
captureException(err, scope => {
scope.addEventProcessor(event => {
addExceptionMechanism(event, {
type: 'instrument',
Expand All @@ -82,9 +82,9 @@ function captureRemixServerException(err: Error, name: string): void {

return event;
});
});

captureException(err);
return scope;
});
}

function makeWrappedDocumentRequestFunction(
Expand Down

0 comments on commit 9ee8190

Please sign in to comment.