Skip to content

Commit

Permalink
Log nil secret IDs instead of swallowing error
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferai committed Jul 23, 2018
1 parent 9a287ed commit 9003041
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions builtin/credential/approle/path_tidy_user_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"time"

"github.com/hashicorp/errwrap"
"github.com/hashicorp/go-multierror"
"github.com/hashicorp/vault/logical"
"github.com/hashicorp/vault/logical/framework"
)
Expand Down Expand Up @@ -39,8 +38,6 @@ func (b *backend) tidySecretID(ctx context.Context, req *logical.Request) (*logi
go func() {
defer atomic.StoreUint32(b.tidySecretIDCASGuard, 0)

var result error

// Don't cancel when the original client request goes away
ctx = context.Background()

Expand Down Expand Up @@ -74,7 +71,7 @@ func (b *backend) tidySecretID(ctx context.Context, req *logical.Request) (*logi
}

if secretIDEntry == nil {
result = multierror.Append(result, fmt.Errorf("entry for SecretID %q is nil", secretIDHMAC))
logger.Error("entry for secret id was nil", "secret_id_hmac", secretIDHMAC)
return nil
}

Expand Down

0 comments on commit 9003041

Please sign in to comment.