Skip to content

Commit

Permalink
Merge pull request #576 from redis/improve-csc-err-msg
Browse files Browse the repository at this point in the history
feat: improve the initial error message by reporting CLIENT related commands fully
  • Loading branch information
rueian authored Jun 21, 2024
2 parents 63951b5 + 510f267 commit 5fe0175
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ func _newPipe(connFn func() (net.Conn, error), option *ClientOption, r2ps, nobg
if !r2 && noHello.MatchString(re.string) {
r2 = true
continue
} else if strings.Contains(re.string, "CLIENT") {
err = fmt.Errorf("%s: %w", re.string, ErrNoCache)
} else if init[i][0] == "CLIENT" {
err = fmt.Errorf("%s: %v\n%w", re.string, init[i], ErrNoCache)
} else if r2 {
continue
}
Expand Down

0 comments on commit 5fe0175

Please sign in to comment.