cleanup: standardize error format in VaultKMS.GetPassphrase()

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-12-08 15:26:42 +01:00 committed by mergify[bot]
parent e3ea8ca0b1
commit 9160a5309e

View File

@ -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