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:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user