diff options
-rw-r--r-- | sms-service/src/sms/backend/vault.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sms-service/src/sms/backend/vault.go b/sms-service/src/sms/backend/vault.go index ba3e502..a560c70 100644 --- a/sms-service/src/sms/backend/vault.go +++ b/sms-service/src/sms/backend/vault.go @@ -287,6 +287,10 @@ func (v *Vault) CreateSecretDomain(name string) (SecretDomain, error) { err = v.vaultClient.Sys().Mount(mountPath, mountInput) if smslogger.CheckError(err, "Create Domain") != nil { + if strings.Contains(err.Error(), "existing mount") { + //It is already mounted + return SecretDomain{}, errors.New("existing domain") + } return SecretDomain{}, errors.New("Unable to create Secret Domain") } |