Fix error reply of GEOSEARCHSTORE unsupported args (#8865)

When [WITHCOORD] [WITHDIST] [WITHHASH] are used, the error mentioned GEORADIUS command
This commit is contained in:
avimredis 2021-04-26 21:11:38 +03:00 committed by GitHub
parent ebfbb09109
commit 4bfcf4654a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -651,9 +651,9 @@ void georadiusGeneric(client *c, int srcKeyIndex, int flags) {
/* Trap options not compatible with STORE and STOREDIST. */
if (storekey && (withdist || withhash || withcoords)) {
addReplyError(c,
"STORE option in GEORADIUS is not compatible with "
"WITHDIST, WITHHASH and WITHCOORDS options");
addReplyErrorFormat(c,
"%s is not compatible with WITHDIST, WITHHASH and WITHCOORD options",
flags & GEOSEARCHSTORE? "GEOSEARCHSTORE": "STORE option in GEORADIUS");
return;
}