mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
rebalance status must return appropriate error initially (#16022)
This commit is contained in:
parent
808739867c
commit
72afc2727a
@ -314,7 +314,7 @@ func (a adminAPIHandlers) RebalanceStatus(w http.ResponseWriter, r *http.Request
|
|||||||
|
|
||||||
rs, err := rebalanceStatus(ctx, pools)
|
rs, err := rebalanceStatus(ctx, pools)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if errors.Is(err, errRebalanceNotStarted) {
|
if errors.Is(err, errRebalanceNotStarted) || errors.Is(err, errConfigNotFound) {
|
||||||
writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminRebalanceNotStarted), r.URL)
|
writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminRebalanceNotStarted), r.URL)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user