Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #10 from LF-Engineering/fix-firehose-put
Browse files Browse the repository at this point in the history
Fix firehose response creation
  • Loading branch information
linonymous authored Dec 7, 2021
2 parents 9c9762e + 2a9397c commit 100832f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion firehose/firehose.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,11 @@ func (c *ClientProvider) send(channel string, records []interface{}) ([]*PutResp
var res []*PutResponse
for _, r := range recordBatch.RequestResponses {
if r.RecordId != nil {
res = append(res, &PutResponse{RecordID: *r.RecordId, Error: errors.New(*r.ErrorMessage)})
response := &PutResponse{RecordID: *r.RecordId}
if r.ErrorMessage != nil {
response.Error = errors.New(*r.ErrorMessage)
}
res = append(res, response)
}
}
return res, nil
Expand Down

0 comments on commit 100832f

Please sign in to comment.