mirror of
https://github.com/status-im/consul.git
synced 2025-01-20 18:50:04 +00:00
connect: if the token given to the vault provider returns no data avoid a panic (#9806)
Improves #9800
This commit is contained in:
parent
1325536e41
commit
cbd3b98682
3
.changelog/9806.txt
Normal file
3
.changelog/9806.txt
Normal file
@ -0,0 +1,3 @@
|
||||
```release-note:improvement
|
||||
connect: if the token given to the vault provider returns no data avoid a panic
|
||||
```
|
@ -82,6 +82,8 @@ func (v *VaultProvider) Configure(cfg ProviderConfig) error {
|
||||
secret, err := client.Auth().Token().LookupSelf()
|
||||
if err != nil {
|
||||
return err
|
||||
} else if secret == nil {
|
||||
return fmt.Errorf("Could not look up Vault provider token: not found")
|
||||
}
|
||||
var token struct {
|
||||
Renewable bool
|
||||
|
Loading…
x
Reference in New Issue
Block a user