Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

eventID returned even for failed request by CaptureMessageAndWait #171

Open
@surajssd

Description

@surajssd

Error from client.Transport.Send is not handled, the error returned by following code is assigned to field ch, but this ain't checked anywhere in caller.

raven-go/client.go

Lines 524 to 525 in 563b81f

outgoingPacket.ch <- client.Transport.Send(url, authHeader, outgoingPacket.packet)

inside caller it is not handled here

raven-go/client.go

Lines 595 to 612 in 563b81f

// Lazily start background worker until we
// do our first write into the queue.
client.start.Do(func() {
go client.worker()
})
select {
case client.queue <- outgoingPacket:
default:
// Send would block, drop the packet
if client.DropHandler != nil {
client.DropHandler(packet)
}
ch <- ErrPacketDropped
client.wg.Done()
}
return packet.EventID, ch

nor it's caller

raven-go/client.go

Lines 654 to 659 in 563b81f

eventID, ch := client.Capture(packet, tags)
if eventID != "" {
<-ch
}
return eventID


How to reproduce:

In your client code simply give DSN with wrong domain or somehow the sentry service should be inaccessible to your client code and you could reproduce this issue.


Version:

$ docker images | grep sentry
docker.io/sentry                                    8.22                d4d5c93a8759        2 months ago        536 MB

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions