Skip to content

Commit

Permalink
handle error
Browse files Browse the repository at this point in the history
  • Loading branch information
priyanshi-yb committed Jan 20, 2025
1 parent 6aa224f commit 979c379
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion yb-voyager/src/tgtdb/yugabytedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,11 @@ func (yb *TargetYugabyteDB) InitConnPool() error {
yb.connPool = NewConnectionPool(params)
redactedParams := &ConnectionParams{}
//Whenever adding new fields to CONNECTION PARAMS check if that needs to be redacted while logging
deepcopy.Copy(redactedParams, params)
err := deepcopy.Copy(redactedParams, params)
if err!= nil {
log.Errorf("couldn't get the copy of connection params for logging: %v", err)
return nil
}
redactedParams.ConnUriList = utils.GetRedactedURLs(redactedParams.ConnUriList)
log.Info("Initialized connection pool with settings: ", spew.Sdump(redactedParams))
return nil
Expand Down

0 comments on commit 979c379

Please sign in to comment.