Skip to content
This repository has been archived by the owner on Feb 3, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1 from mercury2269/master
Browse files Browse the repository at this point in the history
Log error code and message for each  BatchResultErrorEntry (#23)
  • Loading branch information
Clément Thuault authored Apr 15, 2021
2 parents c595c61 + d04e24a commit bc1f0ac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,10 @@ func moveMessages(sourceQueueUrl string, destinationQueueUrl string, svc *sqs.SQ
}

if len(sendResp.Failed) > 0 {
log.Error(color.New(color.FgRed).Sprintf("%s messages failed to enqueue, exiting", len(sendResp.Failed)))
log.Error(color.New(color.FgRed).Sprintf("%d messages failed to enqueue, see details below", len(sendResp.Failed)))
for index, failed := range sendResp.Failed {
log.Error(color.New(color.FgRed).Sprintf("%d - (%s) %s", index, *failed.Code, *failed.Message))
}
return
}

Expand Down

0 comments on commit bc1f0ac

Please sign in to comment.