Skip to content

Commit

Permalink
Add more context to batch response parsing error (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
vreynolds authored Feb 22, 2021
1 parent 046dd14 commit 8fdb40b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion transmission/transmission.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,11 @@ func (b *batchAgg) fireBatch(events []*Event) {
if err != nil {
// if we can't decode the responses, just error out all of them
b.metrics.Increment("response_decode_errors")
b.enqueueErrResponses(err, events, dur/time.Duration(numEncoded))
b.enqueueErrResponses(fmt.Errorf(
"got OK HTTP response, but couldn't read response body: %v", err),
events,
dur/time.Duration(numEncoded),
)
return
}

Expand Down

0 comments on commit 8fdb40b

Please sign in to comment.