File tree 1 file changed +8
-1
lines changed
src/main/java/redis/clients/jedis
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -398,7 +398,14 @@ private void initializeFromClientConfig(JedisClientConfig config) {
398
398
if (obj instanceof JedisDataException ) {
399
399
JedisDataException e = (JedisDataException )obj ;
400
400
String errorMsg = e .getMessage ().toUpperCase ();
401
- if (errorMsg .contains ("UNKNOWN" ) ||
401
+ /**
402
+ * 1. Redis 4.0 and before, we need to ignore `Syntax error`.
403
+ * 2. Redis 5.0 and later, we need to ignore `Unknown subcommand error`.
404
+ * 3. Because Jedis allows Jedis jedis = new Jedis() in advance, and jedis.auth(password) later,
405
+ * we need to ignore `NOAUTH errors`.
406
+ */
407
+ if (errorMsg .contains ("SYNTAX" ) ||
408
+ errorMsg .contains ("UNKNOWN" ) ||
402
409
errorMsg .contains ("NOAUTH" )) { // TODO: not filter out NOAUTH
403
410
// ignore
404
411
} else {
You can’t perform that action at this time.
0 commit comments