mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-21 01:14:31 +08:00
* add API specific InternalServerError() * return 500 error msg only if not Production mode * rm unnessesary change
This commit is contained in:
parent
fb155b8fa3
commit
99058de553
@ -77,6 +77,10 @@ func (ctx *APIContext) Error(status int, title string, obj interface{}) {
|
||||
|
||||
if status == http.StatusInternalServerError {
|
||||
log.ErrorWithSkip(1, "%s: %s", title, message)
|
||||
|
||||
if macaron.Env == macaron.PROD {
|
||||
message = ""
|
||||
}
|
||||
}
|
||||
|
||||
ctx.JSON(status, APIError{
|
||||
|
Loading…
Reference in New Issue
Block a user