Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions secretstores/hashicorp/vault/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,10 @@ func (v *vaultSecretStore) getSecret(secret string) (*vaultKVResponse, error) {
if httpresp.StatusCode != 200 {
var b bytes.Buffer
io.Copy(&b, httpresp.Body)
v.logger.Debugf("getSecret %s couldn't get successful response: %#v, %s", secret, httpresp, b.String())

return nil, fmt.Errorf("couldn't to get successful response: %#v, %s",
httpresp, b.String())
return nil, fmt.Errorf("couldn't get successful response, status code %d, body %s",
httpresp.StatusCode, b.String())
}

var d vaultKVResponse
Expand Down Expand Up @@ -252,9 +253,10 @@ func (v *vaultSecretStore) BulkGetSecret(req secretstores.BulkGetSecretRequest)
if httpresp.StatusCode != 200 {
var b bytes.Buffer
io.Copy(&b, httpresp.Body)
v.logger.Debugf("list keys couldn't get successful response: %#v, %s", httpresp, b.String())

return secretstores.BulkGetSecretResponse{Data: nil}, fmt.Errorf("couldn't get successful response: %#v, %s",
httpresp, b.String())
return secretstores.BulkGetSecretResponse{Data: nil}, fmt.Errorf("list keys couldn't get successful response, status code %d, body %s",
httpresp.StatusCode, b.String())
}

var d vaultListKVResponse
Expand Down