File tree 1 file changed +2
-8
lines changed
packages/node/src/integrations/tracing/hapi
1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import { logger } from '@sentry/utils';
15
15
import { DEBUG_BUILD } from '../../../debug-build' ;
16
16
import { generateInstrumentOnce } from '../../../otel/instrument' ;
17
17
import { ensureIsWrapped } from '../../../utils/ensureIsWrapped' ;
18
- import type { Boom , RequestEvent , ResponseObject , Server } from './types' ;
18
+ import type { RequestEvent , Server } from './types' ;
19
19
20
20
const INTEGRATION_NAME = 'Hapi' ;
21
21
@@ -38,10 +38,6 @@ const _hapiIntegration = (() => {
38
38
*/
39
39
export const hapiIntegration = defineIntegration ( _hapiIntegration ) ;
40
40
41
- function isBoomObject ( response : ResponseObject | Boom ) : response is Boom {
42
- return response && ( response as Boom ) . isBoom !== undefined ;
43
- }
44
-
45
41
function isErrorEvent ( event : RequestEvent ) : event is RequestEvent {
46
42
return event && ( event as RequestEvent ) . error !== undefined ;
47
43
}
@@ -76,9 +72,7 @@ export const hapiErrorPlugin = {
76
72
logger . warn ( 'Isolation scope is still the default isolation scope - skipping setting transactionName' ) ;
77
73
}
78
74
79
- if ( request . response && isBoomObject ( request . response ) ) {
80
- sendErrorToSentry ( request . response ) ;
81
- } else if ( isErrorEvent ( event ) ) {
75
+ if ( isErrorEvent ( event ) ) {
82
76
sendErrorToSentry ( event . error ) ;
83
77
}
84
78
} ) ;
You can’t perform that action at this time.
0 commit comments