@@ -270,7 +270,7 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {
270
270
public sendEvent ( event : Event ) : void {
271
271
if ( this . _dsn ) {
272
272
const env = createEventEnvelope ( event , this . _dsn , this . _options . _metadata , this . _options . tunnel ) ;
273
- this . sendEnvelope ( env ) ;
273
+ this . _sendEnvelope ( env ) ;
274
274
}
275
275
}
276
276
@@ -280,20 +280,7 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {
280
280
public sendSession ( session : Session | SessionAggregates ) : void {
281
281
if ( this . _dsn ) {
282
282
const env = createSessionEnvelope ( session , this . _dsn , this . _options . _metadata , this . _options . tunnel ) ;
283
- this . sendEnvelope ( env ) ;
284
- }
285
- }
286
-
287
- /**
288
- * @inheritdoc
289
- */
290
- public sendEnvelope ( env : Envelope ) : void {
291
- if ( this . _transport && this . _dsn ) {
292
- this . _transport . send ( env ) . then ( null , reason => {
293
- IS_DEBUG_BUILD && logger . error ( 'Error while sending event:' , reason ) ;
294
- } ) ;
295
- } else {
296
- IS_DEBUG_BUILD && logger . error ( 'Transport disabled' ) ;
283
+ this . _sendEnvelope ( env ) ;
297
284
}
298
285
}
299
286
@@ -659,6 +646,19 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {
659
646
) ;
660
647
}
661
648
649
+ /**
650
+ * @inheritdoc
651
+ */
652
+ private _sendEnvelope ( envelope : Envelope ) : void {
653
+ if ( this . _transport && this . _dsn ) {
654
+ this . _transport . send ( envelope ) . then ( null , reason => {
655
+ IS_DEBUG_BUILD && logger . error ( 'Error while sending event:' , reason ) ;
656
+ } ) ;
657
+ } else {
658
+ IS_DEBUG_BUILD && logger . error ( 'Transport disabled' ) ;
659
+ }
660
+ }
661
+
662
662
/**
663
663
* @inheritDoc
664
664
*/
0 commit comments