From 7688306f87da143bf8c869c871fc6ef02a315baa Mon Sep 17 00:00:00 2001 From: Rakshith R Date: Thu, 26 May 2022 12:01:34 +0530 Subject: [PATCH] rbd: use vaultAuthPath variable name in error msg Before the change, the error msg was the following: ``` failed to set VAULT_AUTH_MOUNT_PATH in Vault config: path is empty ``` `vaultAuthPath` is the actual variable name set by the user. The error message will now be the following: ``` failed to set "vaultAuthPath" in vault config: path is empty ``` Signed-off-by: Rakshith R --- internal/kms/vault_sa.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/kms/vault_sa.go b/internal/kms/vault_sa.go index 319d63008..33c92f915 100644 --- a/internal/kms/vault_sa.go +++ b/internal/kms/vault_sa.go @@ -208,7 +208,7 @@ func (kms *vaultTenantSA) parseConfig(config map[string]interface{}) error { } else if err == nil { kms.vaultConfig[vault.AuthMountPath], err = detectAuthMountPath(vaultAuthPath) if err != nil { - return fmt.Errorf("failed to set %s in Vault config: %w", vault.AuthMountPath, err) + return fmt.Errorf("failed to set \"vaultAuthPath\" in Vault config: %w", err) } }