Skip to content

Commit

Permalink
chore: ignore nil redis error
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Nov 25, 2024
1 parent 43d03ab commit 792c56b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/pkg/cache/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ func (c redisCache) MGet(ctx context.Context, keys []string, result any) error {
for _, message := range results {
var v = reflect.New(elementType)

//nolint:errorlint
if message.Error() == rueidis.Nil {
continue
}

e := message.DecodeJSON(v.Interface())
if e != nil {
logger.Warn("unexpected failure when decoding json", zap.Error(e))
Expand Down

0 comments on commit 792c56b

Please sign in to comment.