RemoteCache: Fix null pointer exception in redis cache (#63094)

Fix null pointer exception in redis cache
This commit is contained in:
Selene
2023-02-08 17:08:56 +01:00
committed by GitHub
parent 3716d9841d
commit 5fe3548691

View File

@@ -107,11 +107,10 @@ func (s *redisStorage) SetByteArray(ctx context.Context, key string, data []byte
func (s *redisStorage) Get(ctx context.Context, key string) (interface{}, error) {
v, err := s.GetByteArray(ctx, key)
if err.Error() == "EOF" {
return nil, ErrCacheItemNotFound
}
if err != nil {
if err.Error() == "EOF" {
return nil, ErrCacheItemNotFound
}
return nil, err
}