mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
cleanup: standardize error format in VaultKMS.GetPassphrase()
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
e3ea8ca0b1
commit
9160a5309e
@ -202,11 +202,11 @@ func (kms *VaultKMS) GetPassphrase(key string) (string, error) {
|
||||
|
||||
data, ok := s["data"].(map[string]interface{})
|
||||
if !ok {
|
||||
return "", fmt.Errorf("failed parsing data for get passphrase request for %s", key)
|
||||
return "", fmt.Errorf("failed parsing data for get passphrase request for %q", key)
|
||||
}
|
||||
passphrase, ok := data["passphrase"].(string)
|
||||
if !ok {
|
||||
return "", fmt.Errorf("failed parsing passphrase for get passphrase request for %s", key)
|
||||
return "", fmt.Errorf("failed parsing passphrase for get passphrase request for %q", key)
|
||||
}
|
||||
|
||||
return passphrase, nil
|
||||
|
Loading…
Reference in New Issue
Block a user