Return "WRONGTYPE" error on PF* type mismatch.

This commit is contained in:
antirez 2014-04-03 22:10:20 +02:00
parent 349c978189
commit d2ca4bb62d

View File

@ -464,7 +464,9 @@ int isHLLObjectOrReply(redisClient *c, robj *o) {
/* If this is a string representing an HLL, the size should match
* exactly. */
if (stringObjectLen(o) != REDIS_HLL_SIZE) {
addReplyErrorFormat(c, "Key is not a valid HyperLogLog string value.");
addReplySds(c,
sdsnew("-WRONGTYPE Key is not a valid "
"HyperLogLog string value.\r\n"));
return REDIS_ERR;
}
return REDIS_OK;