Skip to content

Commit

Permalink
fix isRetriableError (#159)
Browse files Browse the repository at this point in the history
fix issues-158
  • Loading branch information
luanruisong authored Sep 16, 2024
1 parent 8d10ac8 commit 4390050
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4390050

Please sign in to comment.