IsAskError checks if an error is a Redis ASK error, even if wrapped. ASK errors occur in cluster mode when a key is being migrated and the client should ask another node. Returns the address of the node to ask and a boolean indicating if it's an ASK error.
(err error)
| 331 | // ASK errors occur in cluster mode when a key is being migrated and the client should ask another node. |
| 332 | // Returns the address of the node to ask and a boolean indicating if it's an ASK error. |
| 333 | func IsAskError(err error) (addr string, ok bool) { |
| 334 | if askErr, isAskErr := proto.IsAskError(err); isAskErr { |
| 335 | return askErr.Addr(), true |
| 336 | } |
| 337 | return "", false |
| 338 | } |
| 339 | |
| 340 | // IsAuthError checks if an error is a Redis authentication error, even if wrapped. |
| 341 | // Authentication errors occur when: |
nothing calls this directly
no test coverage detected