From 72afc2727a452f197ca9adb8f616d7d1d1bca395 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 8 Nov 2022 07:56:45 -0800 Subject: [PATCH] rebalance status must return appropriate error initially (#16022) --- cmd/admin-handlers-pools.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/admin-handlers-pools.go b/cmd/admin-handlers-pools.go index 29b21a50d..56bd5ffa1 100644 --- a/cmd/admin-handlers-pools.go +++ b/cmd/admin-handlers-pools.go @@ -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 }