mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 19:47:54 +00:00
Error out if cluster information is nil when Vault is unsealed
This commit is contained in:
@@ -123,11 +123,12 @@ func getSysHealth(core *vault.Core, r *http.Request) (int, *HealthResponse, erro
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return http.StatusInternalServerError, nil, err
|
return http.StatusInternalServerError, nil, err
|
||||||
}
|
}
|
||||||
if cluster != nil {
|
if cluster == nil {
|
||||||
|
return http.StatusInternalServerError, nil, nil
|
||||||
|
}
|
||||||
clusterName = cluster.Name
|
clusterName = cluster.Name
|
||||||
clusterID = cluster.ID
|
clusterID = cluster.ID
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Format the body
|
// Format the body
|
||||||
body := &HealthResponse{
|
body := &HealthResponse{
|
||||||
|
|||||||
Reference in New Issue
Block a user