mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-10 00:10:20 +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{})
|
data, ok := s["data"].(map[string]interface{})
|
||||||
if !ok {
|
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)
|
passphrase, ok := data["passphrase"].(string)
|
||||||
if !ok {
|
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
|
return passphrase, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user