diff --git a/cmd/admin-handlers-pools.go b/cmd/admin-handlers-pools.go index f4aaf91e8..50e6cdec4 100644 --- a/cmd/admin-handlers-pools.go +++ b/cmd/admin-handlers-pools.go @@ -19,6 +19,7 @@ package cmd import ( "encoding/json" + "fmt" "net/http" "github.com/gorilla/mux" @@ -149,8 +150,10 @@ func (a adminAPIHandlers) StatusPool(w http.ResponseWriter, r *http.Request) { idx := globalEndpoints.GetPoolIdx(v) if idx == -1 { + apiErr := toAdminAPIErr(ctx, errInvalidArgument) + apiErr.Description = fmt.Sprintf("specified pool '%s' not found, please specify a valid pool", v) // We didn't find any matching pools, invalid input - writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, errInvalidArgument), r.URL) + writeErrorResponseJSON(ctx, w, apiErr, r.URL) return } diff --git a/cmd/erasure-server-pool-decom.go b/cmd/erasure-server-pool-decom.go index d9e1d2a3b..f79ae869e 100644 --- a/cmd/erasure-server-pool-decom.go +++ b/cmd/erasure-server-pool-decom.go @@ -921,7 +921,7 @@ func (z *erasureServerPools) Status(ctx context.Context, idx int) (PoolStatus, e pi, err := z.getDecommissionPoolSpaceInfo(idx) if err != nil { - return PoolStatus{}, errInvalidArgument + return PoolStatus{}, err } poolInfo := z.poolMeta.Pools[idx]