Skip to content

Commit

Permalink
Merge pull request #109 from dragonchaser/issue-6251-userlog-not-upda…
Browse files Browse the repository at this point in the history
…ting

handle redis.Nil error properly
  • Loading branch information
asim authored May 10, 2023
2 parents c290133 + 06738dc commit e7defa5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions v4/store/redis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package redis

import (
"context"
"errors"
"fmt"
"time"

Expand Down Expand Up @@ -113,6 +114,9 @@ func (r *rkv) Read(key string, opts ...store.ReadOption) ([]*store.Record, error
}

if len(keys) == 1 {
if errors.Is(err, redis.Nil) {
return records, store.ErrNotFound
}
return records, err
}

Expand Down

0 comments on commit e7defa5

Please sign in to comment.