rebalance status must return appropriate error initially (#16022)

This commit is contained in:
Harshavardhana
2022-11-08 07:56:45 -08:00
committed by GitHub
parent 808739867c
commit 72afc2727a

View File

@@ -314,7 +314,7 @@ func (a adminAPIHandlers) RebalanceStatus(w http.ResponseWriter, r *http.Request
rs, err := rebalanceStatus(ctx, pools)
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)
return
}