From 452a0c9c4528b75f0ab8a38fc72ba310f0df933a Mon Sep 17 00:00:00 2001 From: Thomas Rosenstein Date: Sun, 20 Sep 2020 22:29:47 +0200 Subject: [PATCH] Add error log in case encryption on config save fails Signed-off-by: Thomas Rosenstein --- src/common/config/store/driver/db.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/config/store/driver/db.go b/src/common/config/store/driver/db.go index 2d733754d..26a404ebf 100644 --- a/src/common/config/store/driver/db.go +++ b/src/common/config/store/driver/db.go @@ -72,6 +72,8 @@ func (d *Database) Save(cfgs map[string]interface{}) error { if _, ok := item.ItemType.(*metadata.PasswordType); ok { if encryptPassword, err := encrypt.Instance().Encrypt(strValue); err == nil { entry.Value = encryptPassword + } else { + log.Errorf("encrypt password failed, error: %v", err) } } configEntries = append(configEntries, *entry)