This commit is contained in:
Mikhail 2024-09-16 15:34:33 +10:00
parent eaadad72e5
commit 17f9712796
No known key found for this signature in database
GPG key ID: 6FFFEA01DBC79BFC

View file

@ -299,10 +299,10 @@ func (c *Consumer) getShardIterator(ctx context.Context, streamName, shardID, se
} }
func isRetriableError(err error) bool { func isRetriableError(err error) bool {
if oe := (*types.ExpiredIteratorException)(nil); errors.As(err, &oe) { switch err.(type) {
case *types.ExpiredIteratorException:
return true return true
} case *types.ProvisionedThroughputExceededException:
if oe := (*types.ProvisionedThroughputExceededException)(nil); errors.As(err, &oe) {
return true return true
} }
return false return false