mirror of
https://github.com/fluencelabs/redis
synced 2025-06-14 01:31:21 +00:00
Type mismatch errors are now prefixed with WRONGTYPE.
So instead to reply with a generic error like: -ERR ... wrong kind of value ... now it replies with: -WRONGTYPE ... wrong kind of value ... This makes this particular error easy to check without resorting to (fragile) pattern matching of the error string (however the error string used to be consistent already). Client libraries should return a specific exeption type for this error. Most of the commit is about fixing unit tests.
This commit is contained in:
@ -1032,7 +1032,7 @@ void createSharedObjects(void) {
|
||||
shared.pong = createObject(REDIS_STRING,sdsnew("+PONG\r\n"));
|
||||
shared.queued = createObject(REDIS_STRING,sdsnew("+QUEUED\r\n"));
|
||||
shared.wrongtypeerr = createObject(REDIS_STRING,sdsnew(
|
||||
"-ERR Operation against a key holding the wrong kind of value\r\n"));
|
||||
"-WRONGTYPE Operation against a key holding the wrong kind of value\r\n"));
|
||||
shared.nokeyerr = createObject(REDIS_STRING,sdsnew(
|
||||
"-ERR no such key\r\n"));
|
||||
shared.syntaxerr = createObject(REDIS_STRING,sdsnew(
|
||||
|
Reference in New Issue
Block a user