File tree 3 files changed +9
-18
lines changed
integration-node-globalhandlers/src 3 files changed +9
-18
lines changed Original file line number Diff line number Diff line change 1
1
import { ClientLike } from '@sentry/types' ;
2
- import { forget , logger } from '@sentry/utils' ;
2
+ import { logger } from '@sentry/utils' ;
3
3
4
4
const DEFAULT_SHUTDOWN_TIMEOUT = 2000 ;
5
5
@@ -12,13 +12,17 @@ export function logAndExitProcess(client: ClientLike): (error: { stack?: string
12
12
console . error ( error && error . stack ? error . stack : error ) ;
13
13
14
14
const timeout = client . options . shutdownTimeout ?? DEFAULT_SHUTDOWN_TIMEOUT ;
15
- forget (
16
- client . close ( timeout ) . then ( ( result : boolean ) => {
15
+ client
16
+ . close ( timeout )
17
+ . then ( ( result : boolean ) => {
17
18
if ( ! result ) {
18
19
logger . warn ( 'We reached the timeout for emptying the request buffer, still exiting now!' ) ;
19
20
}
20
21
global . process . exit ( 1 ) ;
21
- } ) ,
22
- ) ;
22
+ } )
23
+ . then ( null , e => {
24
+ // eslint-disable-next-line no-console
25
+ console . error ( e ) ;
26
+ } ) ;
23
27
} ;
24
28
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- export * from './async' ;
2
1
export * from './browser' ;
3
2
export * from './error' ;
4
3
export * from './instrument' ;
You can’t perform that action at this time.
0 commit comments