twitchscience / kinsumer

Native Go consumer for AWS Kinesis streams.
Other
134 stars 35 forks source link

Improve aws error rendering #60

Closed WillSewell closed 4 years ago

WillSewell commented 4 years ago

Currently we see errors logged like:

Got error:  (%!s(<nil>)) retry count is 0 / 3

Which implies there are cases where awsErr.Message() == "". For that reason I think it's more important that the awsErr.Code() is logged.

In addition, the formatting looks quite ugly when awsErr.Message() == nil, so I also added a conditional check before formatting it.