Source: Audit finding M7
Error messages are inconsistent in wording and format compared to Redis 7.2. Examples:
- "ERR invalid expire time in 'set' command"
- "ERR value is not an integer or out of range"
- "WRONGTYPE Operation against a key holding the wrong kind of value"
Some are correct; many are ad-hoc. Real Redis has a small set of well-known error prefixes (`ERR`, `WRONGTYPE`, `MOVED`, `ASK`, `NOSCRIPT`, `BUSY`, `LOADING`, `OOM`, `READONLY`, `MASTERDOWN`, `MISCONF`, `NOREPLICAS`, `NOAUTH`, `WRONGPASS`, `NOPROTO`).
Suggested approach: Define an `enum RedisError` with variants for each prefix + payload, then `impl From for RespValue`. Sweep command handlers to use the enum. Add a test that diffs sample command outputs against expected Redis 7.2 wording for the parity-critical commands.
Scope: ~40 command files, ~hundreds of `RespValue::error(...)` call sites.
Source: Audit finding M7
Error messages are inconsistent in wording and format compared to Redis 7.2. Examples:
Some are correct; many are ad-hoc. Real Redis has a small set of well-known error prefixes (`ERR`, `WRONGTYPE`, `MOVED`, `ASK`, `NOSCRIPT`, `BUSY`, `LOADING`, `OOM`, `READONLY`, `MASTERDOWN`, `MISCONF`, `NOREPLICAS`, `NOAUTH`, `WRONGPASS`, `NOPROTO`).
Suggested approach: Define an `enum RedisError` with variants for each prefix + payload, then `impl From for RespValue`. Sweep command handlers to use the enum. Add a test that diffs sample command outputs against expected Redis 7.2 wording for the parity-critical commands.
Scope: ~40 command files, ~hundreds of `RespValue::error(...)` call sites.