Exceptions¶
coredis.exceptions
Cluster Errors¶
- exception AskError(resp: str)[source]¶
Error indicated
ASK
error received from cluster.When a slot is set as
MIGRATING
, the node will accept all queries that pertain to this hash slot, but only if the key in question exists, otherwise the query is forwarded using a -ASK redirection to the node that is target of the migration.- src node:
MIGRATING
to dst node get >
ASK
error ask dst node >ASKING
command- dst node:
IMPORTING
from src node asking command only affects next command any op will be allowed after asking command
- src node:
- exception ClusterCrossSlotError(message: str | None = None, command: bytes | None = None, keys: tuple[ValueT, ...] | None = None)[source]¶
Raised when keys in request don’t hash to the same slot
- exception ClusterDownError(resp: str)[source]¶
Error indicated
CLUSTERDOWN
error received from cluster.By default Redis Cluster nodes stop accepting queries if they detect there is at least a hash slot uncovered (no available node is serving it). This way if the cluster is partially down (for example a range of hash slots are no longer covered) the entire cluster eventually becomes unavailable. It automatically returns available as soon as all the slots are covered again.
- exception ClusterError[source]¶
Cluster errors occurred multiple times, resulting in an exhaustion of the command execution
TTL
- exception ClusterResponseError[source]¶
Raised when application logic to combine multi node cluster responses has errors.
- exception ClusterRoutingError[source]¶
Raised when keys in request can’t be routed to destination nodes
Sentinel Errors¶
Scripting Errors¶
Stream Consumer Errors¶
General Exceptions¶
- exception CommandSyntaxError(arguments: set[str], message: str)[source]¶
Raised when a redis command is called with an invalid syntax
- exception CommandNotSupportedError(cmd: str, current_version: str)[source]¶
Raised when the target server doesn’t support a command due to version mismatch
- exception ModuleCommandNotSupportedError(cmd: str, module: str, current_version: str)[source]¶
Raised when the target server doesn’t support a module command due to version mismatch of the module
- exception PersistenceError(command: bytes, local: int, replicas: int, timeout: int)[source]¶
Raised when the persistence requirements were not met
- exception RedisError[source]¶
Base exception from which all other exceptions in coredis derive from.