From 17f97127963b7481f91162845f57d0d68d5ce850 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Mon, 16 Sep 2024 15:34:33 +1000 Subject: [PATCH] revert --- consumer.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/consumer.go b/consumer.go index e28fe67..4777356 100644 --- a/consumer.go +++ b/consumer.go @@ -299,10 +299,10 @@ func (c *Consumer) getShardIterator(ctx context.Context, streamName, shardID, se } func isRetriableError(err error) bool { - if oe := (*types.ExpiredIteratorException)(nil); errors.As(err, &oe) { + switch err.(type) { + case *types.ExpiredIteratorException: return true - } - if oe := (*types.ProvisionedThroughputExceededException)(nil); errors.As(err, &oe) { + case *types.ProvisionedThroughputExceededException: return true } return false