Skip to content

Commit 152a8ec

Browse files
author
Luca Forstner
committed
Make sendEnvelope private
1 parent de2822b commit 152a8ec

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

packages/core/src/baseclient.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {
270270
public sendEvent(event: Event): void {
271271
if (this._dsn) {
272272
const env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);
273-
this.sendEnvelope(env);
273+
this._sendEnvelope(env);
274274
}
275275
}
276276

@@ -280,20 +280,7 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {
280280
public sendSession(session: Session | SessionAggregates): void {
281281
if (this._dsn) {
282282
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);
297284
}
298285
}
299286

@@ -659,6 +646,19 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {
659646
);
660647
}
661648

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+
662662
/**
663663
* @inheritDoc
664664
*/

0 commit comments

Comments
 (0)