summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2014-04-03 22:10:20 +0200
committerantirez <antirez@gmail.com>2014-04-16 15:26:09 +0200
commita97675923df7ef8b96180e691ef5637ca3de0642 (patch)
tree255a5f2f2305700872c7612de57b1f7413b9c336
parentfaa7f259cc9505d6eb24aa6ad6950d73e0bd8c1f (diff)
downloadredis-a97675923df7ef8b96180e691ef5637ca3de0642.tar.gz
Return "WRONGTYPE" error on PF* type mismatch.
-rw-r--r--src/hyperloglog.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/hyperloglog.c b/src/hyperloglog.c
index d32a94be2..02fd2728a 100644
--- a/src/hyperloglog.c
+++ b/src/hyperloglog.c
@@ -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;