"include/raft_log.h" did not exist on "4469906e9b32c117c0ce2626b3e06cfde81a2676"
Commit ba146d4c authored by Vasyl Melnychuk's avatar Vasyl Melnychuk Committed by antirez
Browse files

Make error when submitting command in incorrect context more explicit

So error message `ERR only (P)SUBSCRIBE / (P)UNSUBSCRIBE / PING / QUIT allowed in this context` will become
`ERR 'get' command submitted, but only (P)SUBSCRIBE / (P)UNSUBSCRIBE / PING / QUIT allowed in this context`
parent 721a39dd
......@@ -3498,7 +3498,10 @@ int processCommand(client *c) {
c->cmd->proc != unsubscribeCommand &&
c->cmd->proc != psubscribeCommand &&
c->cmd->proc != punsubscribeCommand) {
addReplyError(c,"only (P)SUBSCRIBE / (P)UNSUBSCRIBE / PING / QUIT allowed in this context");
addReplyErrorFormat(c,
"'%s' command submitted, but only (P)SUBSCRIBE / "
"(P)UNSUBSCRIBE / PING / QUIT allowed in this context",
c->cmd->name);
return C_OK;
}
......
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