# Redis error codes

> Every Redis error prefix, from WRONGTYPE and MOVED to MISCONF and BUSYGROUP, with the exact reply text the server sends and full write-ups of the errors you meet most.

Source: https://sqlly.app/errors/redis
Last updated: 2026-11-30
License: Text and data [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) (credit SQLly, sqlly.app); code and SQL snippets [MIT](https://opensource.org/license/mit). [Details](https://sqlly.app/license).
Note: Quoted error message text belongs to its database vendor.

Redis does not use numbered error codes. Every failed command gets a single reply line that starts with an uppercase prefix such as WRONGTYPE, MOVED or OOM, followed by a human-readable message. The prefix is the stable part: match on it, not on the prose, which changes between Redis versions.

Two families break the plain-message pattern: MOVED and ASK carry a hash slot and an endpoint (MOVED 12182 127.0.0.1:7002), and ERR is the generic prefix Redis puts in front of message-specific failures such as unknown command or wrong number of arguments. The pages below cover the prefixes that come up in day-to-day work, with the exact reply text and what to run next.

## Reading a Redis error

The reply is one line: a dash, the uppercase prefix, then the message. The first token is the code. Match on the prefix in your error handling, because the wording after it is not stable across Redis versions.

MOVED and ASK embed routing data: the hash slot and the host:port that owns it. Cluster-aware clients follow them silently; plain redis-cli needs -c to do the same.

ERR is the catch-all prefix. The message after it names the real problem, such as unknown command, wrong number of arguments or invalid expire time, and each of those has its own page here.

Most drivers surface the whole reply line as the exception message, so the prefix arrives intact. Match on the prefix from that string rather than on driver-specific exception classes, which vary by library and language.

## Connection and auth

- [`NOAUTH`](https://sqlly.app/errors/redis/noauth): Authentication required
- [`WRONGPASS`](https://sqlly.app/errors/redis/wrongpass): Password or username rejected
- [`NOPERM`](https://sqlly.app/errors/redis/noperm): The ACL user lacks permission

## Cluster and replication

- [`READONLY`](https://sqlly.app/errors/redis/readonly): Write rejected on a read only replica
- [`MASTERDOWN`](https://sqlly.app/errors/redis/masterdown): Stale data is not allowed to be served
- [`MOVED`](https://sqlly.app/errors/redis/moved): The key lives on another cluster node
- [`ASK`](https://sqlly.app/errors/redis/ask): The key is migrating to another node
- [`CROSSSLOT`](https://sqlly.app/errors/redis/crossslot): Multi-key command spans two slots
- [`CLUSTERDOWN`](https://sqlly.app/errors/redis/clusterdown): The cluster cannot serve this slot
- [`TRYAGAIN`](https://sqlly.app/errors/redis/tryagain): Slot is rehashing, retry the command
- [`NOREPLICAS`](https://sqlly.app/errors/redis/noreplicas): Too few healthy replicas to write

## Data types and commands

- [`WRONGTYPE`](https://sqlly.app/errors/redis/wrongtype): The key holds a different data type
- [`ERR unknown command`](https://sqlly.app/errors/redis/unknown-command): Redis does not know this command
- [`ERR wrong number of arguments`](https://sqlly.app/errors/redis/wrong-number-of-arguments): Argument count is wrong
- [`NOSCRIPT`](https://sqlly.app/errors/redis/noscript): Script SHA1 is not cached
- [`EXECABORT`](https://sqlly.app/errors/redis/execabort): Transaction discarded after an error
- [`BUSY`](https://sqlly.app/errors/redis/busy): Server is blocked by a long script
- [`ERR invalid expire time`](https://sqlly.app/errors/redis/invalid-expire-time): Expire value is out of range

## Memory and persistence

- [`OOM`](https://sqlly.app/errors/redis/oom-command-not-allowed): Memory limit reached
- [`MISCONF`](https://sqlly.app/errors/redis/misconf): Persistence is failing, writes stopped
- [`LOADING`](https://sqlly.app/errors/redis/loading): Dataset still loading from disk
- [`BUSYKEY`](https://sqlly.app/errors/redis/busykey): Target key already exists

## Streams and pub/sub

- [`BUSYGROUP`](https://sqlly.app/errors/redis/busygroup): Consumer group already exists
- [`NOGROUP`](https://sqlly.app/errors/redis/nogroup): Consumer group does not exist

Codes and messages are from the [Redis documentation and source code](https://redis.io/docs/latest/).
