Signed-off-by: Wang Xing <hzwangxing@corp.netease.com>
| ... | ... |
@@ -49,6 +49,7 @@ func GetHTTPErrorStatusCode(err error) int {
|
| 49 | 49 |
"not found": http.StatusNotFound, |
| 50 | 50 |
"no such": http.StatusNotFound, |
| 51 | 51 |
"bad parameter": http.StatusBadRequest, |
| 52 |
+ "no command": http.StatusBadRequest, |
|
| 52 | 53 |
"conflict": http.StatusConflict, |
| 53 | 54 |
"impossible": http.StatusNotAcceptable, |
| 54 | 55 |
"wrong login/password": http.StatusUnauthorized, |
| ... | ... |
@@ -116,6 +116,8 @@ This section lists each version from latest to oldest. Each listing includes a |
| 116 | 116 |
* `GET /info` now returns `SecurityOptions` field, showing if `apparmor`, `seccomp`, or `selinux` is supported. |
| 117 | 117 |
* `GET /networks` now supports filtering by `label` and `driver`. |
| 118 | 118 |
* `POST /containers/create` now takes `MaximumIOps` and `MaximumIOBps` fields. Windows daemon only. |
| 119 |
+* `POST /containers/create` now returns a HTTP 400 "bad parameter" message |
|
| 120 |
+ if no command is specified (instead of a HTTP 500 "server error") |
|
| 119 | 121 |
|
| 120 | 122 |
### v1.23 API changes |
| 121 | 123 |
|