mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-11 06:02:18 +00:00
Cadvisor returns richer errors to the kubelet server.
This commit is contained in:
@@ -400,7 +400,13 @@ func (s *Server) serveStats(w http.ResponseWriter, req *http.Request) {
|
||||
http.Error(w, "unknown resource.", http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
if err != nil {
|
||||
switch err {
|
||||
case nil:
|
||||
break
|
||||
case ErrNoKubeletContainers, ErrContainerNotFound:
|
||||
http.Error(w, err.Error(), http.StatusNotFound)
|
||||
return
|
||||
default:
|
||||
s.error(w, err)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user