* add API specific InternalServerError() * return 500 error msg only if not Production mode * rm unnessesary changetags/v1.12.0-rc2
if status == http.StatusInternalServerError { | if status == http.StatusInternalServerError { | ||||
log.ErrorWithSkip(1, "%s: %s", title, message) | log.ErrorWithSkip(1, "%s: %s", title, message) | ||||
if macaron.Env == macaron.PROD { | |||||
message = "" | |||||
} | |||||
} | } | ||||
ctx.JSON(status, APIError{ | ctx.JSON(status, APIError{ |