Fix bug which mistakes 400 error for 500

Signed-off-by: Wang Xing <hzwangxing@corp.netease.com>
Upstream-commit: beca2615782e24fa28803ada067129fdfa88c77d
Component: engine
This commit is contained in:
Wang Xing
2016-05-16 17:15:45 +08:00
parent 5eb70b665b
commit b96d544c7a
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,