diff --git a/builtin/logical/transit/path_keys.go b/builtin/logical/transit/path_keys.go index 6c238cd9f..32587b6c6 100644 --- a/builtin/logical/transit/path_keys.go +++ b/builtin/logical/transit/path_keys.go @@ -70,7 +70,7 @@ func (b *backend) pathPolicyRead( // Verify if wasn't deleted before we grabbed the lock if lp.policy == nil { - return nil, fmt.Errorf("policy %s found in cache but no longer valid after lock", name) + return nil, fmt.Errorf("no existing policy named %s could be found", name) } // Return the response diff --git a/builtin/logical/transit/path_rewrap.go b/builtin/logical/transit/path_rewrap.go index ceb9cf1a1..d8d01bddc 100644 --- a/builtin/logical/transit/path_rewrap.go +++ b/builtin/logical/transit/path_rewrap.go @@ -74,7 +74,7 @@ func (b *backend) pathRewrapWrite( // Verify if wasn't deleted before we grabbed the lock if lp.policy == nil { - return nil, fmt.Errorf("policy %s found in cache but no longer valid after lock", name) + return nil, fmt.Errorf("no existing policy named %s could be found", name) } plaintext, err := lp.policy.Decrypt(context, value) diff --git a/builtin/logical/transit/path_rotate.go b/builtin/logical/transit/path_rotate.go index eeb575bc5..90bbc2e18 100644 --- a/builtin/logical/transit/path_rotate.go +++ b/builtin/logical/transit/path_rotate.go @@ -46,7 +46,7 @@ func (b *backend) pathRotateWrite( // Verify if wasn't deleted before we grabbed the lock if lp.policy == nil { - return nil, fmt.Errorf("policy %s found in cache but no longer valid after lock", name) + return nil, fmt.Errorf("no existing policy named %s could be found", name) } // Generate the policy