1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #22762 from wangxing1517/fix_mistake_400_for_500

Fix bug which mistakes 400 error for 500
This commit is contained in:
Alexander Morozov 2016-05-19 12:04:52 -07:00
commit 376c15bbaa
9 changed files with 10 additions and 0 deletions

View file

@ -49,6 +49,7 @@ func GetHTTPErrorStatusCode(err error) int {
"not found": http.StatusNotFound,
"no such": http.StatusNotFound,
"bad parameter": http.StatusBadRequest,
"no command": http.StatusBadRequest,
"conflict": http.StatusConflict,
"impossible": http.StatusNotAcceptable,
"wrong login/password": http.StatusUnauthorized,

View file

@ -116,6 +116,8 @@ This section lists each version from latest to oldest. Each listing includes a
* `GET /info` now returns `SecurityOptions` field, showing if `apparmor`, `seccomp`, or `selinux` is supported.
* `GET /networks` now supports filtering by `label` and `driver`.
* `POST /containers/create` now takes `MaximumIOps` and `MaximumIOBps` fields. Windows daemon only.
* `POST /containers/create` now returns a HTTP 400 "bad parameter" message
if no command is specified (instead of a HTTP 500 "server error")
### v1.23 API changes

View file

@ -292,6 +292,7 @@ Query Parameters:
Status Codes:
- **201** no error
- **400** bad parameter
- **404** no such container
- **406** impossible to attach (container not running)
- **500** server error

View file

@ -303,6 +303,7 @@ Query Parameters:
Status Codes:
- **201** no error
- **400** bad parameter
- **404** no such container
- **406** impossible to attach (container not running)
- **500** server error

View file

@ -307,6 +307,7 @@ Query Parameters:
Status Codes:
- **201** no error
- **400** bad parameter
- **404** no such container
- **406** impossible to attach (container not running)
- **500** server error

View file

@ -330,6 +330,7 @@ Query Parameters:
Status Codes:
- **201** no error
- **400** bad parameter
- **404** no such container
- **406** impossible to attach (container not running)
- **500** server error

View file

@ -438,6 +438,7 @@ Query Parameters:
Status Codes:
- **201** no error
- **400** bad parameter
- **404** no such container
- **406** impossible to attach (container not running)
- **500** server error

View file

@ -461,6 +461,7 @@ Query Parameters:
Status Codes:
- **201** no error
- **400** bad parameter
- **404** no such container
- **406** impossible to attach (container not running)
- **500** server error

View file

@ -470,6 +470,7 @@ Query Parameters:
Status Codes:
- **201** no error
- **400** bad parameter
- **404** no such container
- **406** impossible to attach (container not running)
- **500** server error