Fix bug: stop/restart/kill an inexisting container returns 500 rather than 404

Signed-off-by: menghui.chen <menghui.chen@alibaba-inc.com>
This commit is contained in:
menghui.chen 2016-04-15 19:25:45 +08:00
parent cc4eea83da
commit 4a54b63c42
1 changed files with 1 additions and 0 deletions

View File

@ -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