Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/core/src/baseclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {

if (this._isEnabled() && this._transport) {
return this._transport.send(envelope).then(null, reason => {
DEBUG_BUILD && logger.error('Error while sending event:', reason);
DEBUG_BUILD && logger.error('Error while sending envelope:', reason);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that sendEnvelope is called for multiple envelope item types (not just events), I opted to slightly change the message here to reflect this

return reason;
});
}
Expand Down
9 changes: 3 additions & 6 deletions packages/core/src/tracing/sentrySpan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,7 @@ function sendSpanEnvelope(envelope: SpanEnvelope): void {
return;
}

const transport = client.getTransport();
if (transport) {
transport.send(envelope).then(null, reason => {
DEBUG_BUILD && logger.error('Error while sending span:', reason);
});
}
// sendEnvelope should not throw
// eslint-disable-next-line @typescript-eslint/no-floating-promises
client.sendEnvelope(envelope);
}
Loading