From: antirez Date: Wed, 23 Dec 2009 11:23:32 +0000 (-0500) Subject: Add the command name in the unknown command error message. X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/2c14807b2dd5c15f1471bec32a7c6dbb077720ee Add the command name in the unknown command error message. --- diff --git a/redis.c b/redis.c index 3da76bb3..622c7d74 100644 --- a/redis.c +++ b/redis.c @@ -1714,7 +1714,9 @@ static int processCommand(redisClient *c) { } cmd = lookupCommand(c->argv[0]->ptr); if (!cmd) { - addReplySds(c,sdsnew("-ERR unknown command\r\n")); + addReplySds(c, + sdscatprintf(sdsempty(), "-ERR unknown command '%s'\r\n", + (char*)c->argv[0]->ptr)); resetClient(c); return 1; } else if ((cmd->arity > 0 && cmd->arity != c->argc) ||