From 4a54b63c42657a0a5712f99ffcfac25749f750fe Mon Sep 17 00:00:00 2001 From: "menghui.chen" Date: Fri, 15 Apr 2016 19:25:45 +0800 Subject: [PATCH] Fix bug: stop/restart/kill an inexisting container returns 500 rather than 404 Signed-off-by: menghui.chen --- api/handlers.go | 1 + 1 file changed, 1 insertion(+) diff --git a/api/handlers.go b/api/handlers.go index 0adcd8ed62..f717ddf480 100644 --- a/api/handlers.go +++ b/api/handlers.go @@ -894,6 +894,7 @@ func proxyContainerAndForceRefresh(c *context, w http.ResponseWriter, r *http.Re if err != nil { if container == nil { httpError(w, err.Error(), http.StatusNotFound) + return } httpError(w, err.Error(), http.StatusInternalServerError) return