fix: log errors from cmdsInfoCache

Since the error gets swallowed in cmdInfo(), it's important to log it so
it's possible for the user to see what the error was.
This commit is contained in:
Jacob Hoffman-Andrews 2022-07-06 14:28:42 -07:00
parent 9f5aacde23
commit fa4d1ea839
1 changed files with 1 additions and 0 deletions

View File

@ -1605,6 +1605,7 @@ func (c *ClusterClient) cmdsInfo(ctx context.Context) (map[string]*CommandInfo,
func (c *ClusterClient) cmdInfo(name string) *CommandInfo { func (c *ClusterClient) cmdInfo(name string) *CommandInfo {
cmdsInfo, err := c.cmdsInfoCache.Get(c.ctx) cmdsInfo, err := c.cmdsInfoCache.Get(c.ctx)
if err != nil { if err != nil {
internal.Logger.Printf(context.TODO(), "getting command info: %s", err)
return nil return nil
} }