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

eventID returned even for failed request by CaptureMessageAndWait #171

Open
surajssd opened this issue Feb 19, 2018 · 1 comment
Open

eventID returned even for failed request by CaptureMessageAndWait #171

surajssd opened this issue Feb 19, 2018 · 1 comment

Comments

@surajssd
Copy link

surajssd commented Feb 19, 2018

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
@OGKevin
Copy link

OGKevin commented Nov 7, 2018

So frustrating want the ch seems to contain no errors and still, the SDK is failing somewhere somehow to deliver the msg to sentry.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants