Fix issue deleting DB connections on Secondaries (#7853)

This commit is contained in:
Brian Kassouf 2019-11-11 09:04:24 -08:00 committed by GitHub
parent 42ec7fbd4e
commit 033c29a26c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,6 +8,7 @@ import (
"strings"
"github.com/fatih/structs"
"github.com/hashicorp/errwrap"
uuid "github.com/hashicorp/go-uuid"
"github.com/hashicorp/vault/sdk/database/dbplugin"
"github.com/hashicorp/vault/sdk/framework"
@ -217,7 +218,7 @@ func (b *databaseBackend) connectionDeleteHandler() framework.OperationFunc {
err := req.Storage.Delete(ctx, fmt.Sprintf("config/%s", name))
if err != nil {
return nil, errors.New("failed to delete connection configuration")
return nil, errwrap.Wrapf("failed to delete connection configuration: {{err}}", err)
}
if err := b.ClearConnection(name); err != nil {