Commit 2c14807b authored by antirez's avatar antirez
Browse files

Add the command name in the unknown command error message.

parent 752da584
...@@ -1714,7 +1714,9 @@ static int processCommand(redisClient *c) { ...@@ -1714,7 +1714,9 @@ static int processCommand(redisClient *c) {
} }
cmd = lookupCommand(c->argv[0]->ptr); cmd = lookupCommand(c->argv[0]->ptr);
if (!cmd) { 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); resetClient(c);
return 1; return 1;
} else if ((cmd->arity > 0 && cmd->arity != c->argc) || } else if ((cmd->arity > 0 && cmd->arity != c->argc) ||
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment