web/api/v1: rename http status code. (#7864)

Signed-off-by: johncming <johncming@yahoo.com>
This commit is contained in:
johncming 2020-08-28 18:18:31 +08:00 committed by GitHub
parent d30f202c08
commit a14245b4b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1514,7 +1514,7 @@ func (api *API) respondError(w http.ResponseWriter, apiErr *apiError, data inter
case errorBadData:
code = http.StatusBadRequest
case errorExec:
code = 422
code = http.StatusUnprocessableEntity
case errorCanceled, errorTimeout:
code = http.StatusServiceUnavailable
case errorInternal: