RemoteCache: Fix null pointer exception in redis cache (#63094)
Fix null pointer exception in redis cache
This commit is contained in:
@@ -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) {
|
func (s *redisStorage) Get(ctx context.Context, key string) (interface{}, error) {
|
||||||
v, err := s.GetByteArray(ctx, key)
|
v, err := s.GetByteArray(ctx, key)
|
||||||
|
|
||||||
if err.Error() == "EOF" {
|
|
||||||
return nil, ErrCacheItemNotFound
|
|
||||||
}
|
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if err.Error() == "EOF" {
|
||||||
|
return nil, ErrCacheItemNotFound
|
||||||
|
}
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user