use more friendly error messages (#2364)

This commit is contained in:
zryfish
2020-07-09 18:33:24 +08:00
committed by GitHub
parent b479195aea
commit eeaa4b646a
4 changed files with 47 additions and 15 deletions

View File

@@ -118,13 +118,13 @@ func (c *clusterDispatch) Dispatch(w http.ResponseWriter, req *http.Request, han
}
if !isClusterReady(cluster) {
http.Error(w, fmt.Sprintf("cluster is not ready"), http.StatusInternalServerError)
http.Error(w, fmt.Sprintf("cluster %s is not ready", cluster.Name), http.StatusInternalServerError)
return
}
innCluster := c.getInnerCluster(cluster.Name)
if innCluster == nil {
http.Error(w, fmt.Sprintf("cluster not ready"), http.StatusInternalServerError)
http.Error(w, fmt.Sprintf("cluster %s is not ready", cluster.Name), http.StatusInternalServerError)
return
}