Exceptions¶
coredis.exceptions
Cluster Errors¶
- exception AskError(resp: str)[source]¶
Error indicated
ASKerror 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:
MIGRATINGto dst node get >
ASKerror ask dst node >ASKINGcommand- dst node:
IMPORTINGfrom 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[RedisValueT, ...] | None = None)[source]¶
Raised when keys in request don’t hash to the same slot
- exception ClusterDownError(resp: str)[source]¶
Error indicated
CLUSTERDOWNerror 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¶
- exception PrimaryNotFoundError[source]¶
Raised when a primary cannot be located in a sentinel managed redis
- exception ReplicaNotFoundError[source]¶
Raised when a replica cannot be located in a sentinel managed redis
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 ConnectionError[source]¶
Raised when a connection to Redis cannot be established or is lost.
This exception indicates a failure in the underlying network connection, protocol handshake, or connection configuration
- 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.