Update error return strings
This commit is contained in:
parent
3396b42c6c
commit
073e755aa6
|
@ -70,7 +70,7 @@ func (b *backend) pathPolicyRead(
|
||||||
|
|
||||||
// Verify if wasn't deleted before we grabbed the lock
|
// Verify if wasn't deleted before we grabbed the lock
|
||||||
if lp.policy == nil {
|
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
|
// Return the response
|
||||||
|
|
|
@ -74,7 +74,7 @@ func (b *backend) pathRewrapWrite(
|
||||||
|
|
||||||
// Verify if wasn't deleted before we grabbed the lock
|
// Verify if wasn't deleted before we grabbed the lock
|
||||||
if lp.policy == nil {
|
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)
|
plaintext, err := lp.policy.Decrypt(context, value)
|
||||||
|
|
|
@ -46,7 +46,7 @@ func (b *backend) pathRotateWrite(
|
||||||
|
|
||||||
// Verify if wasn't deleted before we grabbed the lock
|
// Verify if wasn't deleted before we grabbed the lock
|
||||||
if lp.policy == nil {
|
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
|
// Generate the policy
|
||||||
|
|
Loading…
Reference in a new issue