mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-03 12:11:41 +00:00
Make exec start return proper error codes
Exec start was sending HTTP 500 for every error. Fixed an error where pausing a container and then calling exec start caused the daemon to freeze. Updated API docs which incorrectly showed that a successful exec start was an HTTP 201, in reality it is HTTP 200. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
+2
-2
@@ -654,7 +654,7 @@ var (
|
||||
Value: "CONTAINERNOTRUNNING",
|
||||
Message: "Container %s is not running: %s",
|
||||
Description: "An attempt was made to retrieve the information about an 'exec' but the container is not running",
|
||||
HTTPStatusCode: http.StatusInternalServerError,
|
||||
HTTPStatusCode: http.StatusConflict,
|
||||
})
|
||||
|
||||
// ErrorCodeNoExecID is generated when we try to get the info
|
||||
@@ -672,7 +672,7 @@ var (
|
||||
Value: "EXECPAUSED",
|
||||
Message: "Container %s is paused, unpause the container before exec",
|
||||
Description: "An attempt to start an 'exec' was made, but the owning container is paused",
|
||||
HTTPStatusCode: http.StatusInternalServerError,
|
||||
HTTPStatusCode: http.StatusConflict,
|
||||
})
|
||||
|
||||
// ErrorCodeExecRunning is generated when we try to start an exec
|
||||
|
||||
Reference in New Issue
Block a user