File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -29,10 +29,10 @@ Common error types from go-redis include:
2929
3030| Error | When it occurs | Recoverable | Recommended action |
3131| ---| ---| ---| ---|
32- | ` redis.Nil ` | Key does not exist | Yes | Return default value or fetch from source |
33- | ` context.DeadlineExceeded ` | Operation timeout | Yes | Retry with backoff |
34- | ` net.OpError ` | Network error | Yes | Retry with backoff or fall back to alternative |
35- | ` redis.ResponseError ` | Redis error response | No | Fix the command or arguments |
32+ | ` redis.Nil ` | Key does not exist | ✅ | Return default value or fetch from source |
33+ | ` context.DeadlineExceeded ` | Operation timeout | ✅ | Retry with backoff |
34+ | ` net.OpError ` | Network error | ✅ | Retry with backoff or fall back to alternative |
35+ | ` redis.ResponseError ` | Redis error response | ❌ | Fix the command or arguments |
3636
3737See [ Categories of errors] ({{< relref "/develop/clients/error-handling#categories-of-errors" >}})
3838for a more detailed discussion of these errors and their causes.
Original file line number Diff line number Diff line change @@ -40,10 +40,10 @@ for a more detailed discussion of these errors and their causes.
4040
4141| Exception | When it occurs | Recoverable | Recommended action |
4242| ---| ---| ---| ---|
43- | ` redis.ConnectionError ` | Network or connection issues | Yes | Retry with backoff or fall back to alternative |
44- | ` redis.TimeoutError ` | Operation exceeded timeout | Yes | Retry with backoff |
45- | ` redis.ResponseError ` | Invalid command or Redis error response | No | Fix the command or arguments |
46- | ` redis.DataError ` | Data serialization/deserialization issues | Sometimes | Log, invalidate cache, fetch fresh data |
43+ | ` redis.ConnectionError ` | Network or connection issues | ✅ | Retry with backoff or fall back to alternative |
44+ | ` redis.TimeoutError ` | Operation exceeded timeout | ✅ | Retry with backoff |
45+ | ` redis.ResponseError ` | Invalid command or Redis error response | ❌ | Fix the command or arguments |
46+ | ` redis.DataError ` | Data serialization/deserialization issues | ⚠️ | Log, invalidate cache, fetch fresh data |
4747
4848## Applying error handling patterns
4949
You can’t perform that action at this time.
0 commit comments