Merge pull request #7423 from wy65701436/hide-501

Disable throw internal error to UI
This commit is contained in:
stonezdj(Daojun Zhang) 2019-04-18 12:52:06 +08:00 committed by GitHub
commit d1f4a73004
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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.