Disable throw internal error to UI

Signed-off-by: wang yan <wangyan@vmware.com>
This commit is contained in:
wang yan 2019-04-18 00:04:16 +08:00
parent a6af9e9972
commit ba76550d14

View File

@ -223,7 +223,8 @@ func (b *BaseAPI) SendBadRequestError(err error) {
// SendInternalServerError sends internal server error to the client.
func (b *BaseAPI) SendInternalServerError(err error) {
b.RenderFormattedError(http.StatusInternalServerError, err.Error())
log.Error(err.Error())
b.RenderFormattedError(http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError))
}
// SendForbiddenError sends forbidden error to the client.