Skip to content

Commit

Permalink
Patch kinesis error capture
Browse files Browse the repository at this point in the history
  • Loading branch information
colmsnowplow committed Mar 27, 2023
1 parent 49908d9 commit 44fedcf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/target/kinesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,9 @@ func (kt *KinesisTarget) process(messages []*models.Message) (*models.TargetWrit
if res.FailedRecordCount != nil && *res.FailedRecordCount > int64(0) {
failed := messages

// We can have 1 or more error, so wrap em up and return them:
var kinesisErrs error
// Wrap produces nil if the initial error is nil, so create an empty error instead
kinesisErrs := errors.New("")

for _, record := range res.Records {
if record.ErrorMessage != nil {
kinesisErrs = errors.Wrap(kinesisErrs, *record.ErrorMessage)
Expand Down

0 comments on commit 44fedcf

Please sign in to comment.