Skip to content

Commit 5fe0175

Browse files
authored
Merge pull request #576 from redis/improve-csc-err-msg
feat: improve the initial error message by reporting CLIENT related commands fully
2 parents 63951b5 + 510f267 commit 5fe0175

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pipe.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ func _newPipe(connFn func() (net.Conn, error), option *ClientOption, r2ps, nobg
240240
if !r2 && noHello.MatchString(re.string) {
241241
r2 = true
242242
continue
243-
} else if strings.Contains(re.string, "CLIENT") {
244-
err = fmt.Errorf("%s: %w", re.string, ErrNoCache)
243+
} else if init[i][0] == "CLIENT" {
244+
err = fmt.Errorf("%s: %v\n%w", re.string, init[i], ErrNoCache)
245245
} else if r2 {
246246
continue
247247
}

0 commit comments

Comments
 (0)