mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 19:47:54 +00:00
Checking if client is not nil before deleting token
Signed-off-by: Nicolas Corrarello <nicolas@corrarello.com>
This commit is contained in:
@@ -46,6 +46,10 @@ func (b *backend) secretTokenRevoke(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if c == nil {
|
||||
return nil, fmt.Errorf("Error connecting with Nomad")
|
||||
}
|
||||
|
||||
accessorIDRaw, ok := req.Secret.InternalData["accessor_id"]
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("accessor_id is missing on the lease")
|
||||
|
||||
Reference in New Issue
Block a user