File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/main/java/redis/clients/jedis Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -429,7 +429,14 @@ private void initializeFromClientConfig(JedisClientConfig config) {
429429 if (obj instanceof JedisDataException ) {
430430 JedisDataException e = (JedisDataException )obj ;
431431 String errorMsg = e .getMessage ().toUpperCase ();
432- if (errorMsg .contains ("UNKNOWN" ) ||
432+ /**
433+ * 1. Redis 4.0 and before, we need to ignore `Syntax error`.
434+ * 2. Redis 5.0 and later, we need to ignore `Unknown subcommand error`.
435+ * 3. Because Jedis allows Jedis jedis = new Jedis() in advance, and jedis.auth(password) later,
436+ * we need to ignore `NOAUTH errors`.
437+ */
438+ if (errorMsg .contains ("SYNTAX" ) ||
439+ errorMsg .contains ("UNKNOWN" ) ||
433440 errorMsg .contains ("NOAUTH" )) { // TODO: not filter out NOAUTH
434441 // ignore
435442 } else {
You can’t perform that action at this time.
0 commit comments