fix isRetriableError (#159)

fix issues-158
This commit is contained in:
lrs 2024-09-17 03:27:23 +08:00 committed by GitHub
parent 8d10ac8dac
commit 43900507c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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