Authentication & Authorization#

exception AuthenticationFailureError[source]#

Raised when authentication parameters were provided but were invalid

exception AuthenticationRequiredError[source]#

Raised when authentication parameters are required but not provided

exception AuthorizationError[source]#

Base class for authorization errors

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

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

exception ClusterTransactionError(msg: str)[source]#
exception MovedError(resp: str)[source]#

Error indicated MOVED error received from cluster. A request sent to a node that doesn’t serve this key will be replayed with a MOVED error that points to the correct node.

exception RedisClusterException[source]#

Base exception for the RedisCluster client

exception TryAgainError[source]#

Error indicated TRYAGAIN error received from cluster. Operations on keys that don’t exist or are - during resharding - split between the source and destination nodes, will generate a -TRYAGAIN error.

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#

exception NoScriptError[source]#
exception FunctionError[source]#

Raised for errors relating to redis functions

exception NotBusyError[source]#

Raised when script kill or function kill have nothing to terminate

Stream Consumer Errors#

exception StreamConsumerInitializationError[source]#

Raised when a stream consumer could not be initialized based on the configuration provided

exception StreamDuplicateConsumerGroupError[source]#

Raised when and attempt to create a stream consumer group fails because it already exists

General Exceptions#

exception BusyLoadingError[source]#
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 ConnectionError[source]#
exception DataError[source]#
exception ExecAbortError[source]#
exception InvalidResponse[source]#
exception LockError[source]#

Errors acquiring or releasing a lock

exception NoKeyError[source]#

Raised when a key provided in the command is missing

exception PersistenceError(command: bytes, local: int, replicas: int, timeout: int)[source]#

Raised when the persistence requirements were not met

exception PubSubError[source]#
exception ReadOnlyError[source]#
exception RedisError[source]#

Base exception from which all other exceptions in coredis derive from.

exception ReplicationError(command: bytes, replicas: int, timeout: int)[source]#

Raised when the replication requirements were not met

exception ResponseError[source]#
exception TimeoutError[source]#
exception UnblockedError[source]#

Raised if a blocked client is unblocked forcefully

exception WatchError[source]#