forked from NYANDEV/forgejo
Provide better panic handling (#5902)
This PR gitea'ises the macaron.Recovery() handler meaning that in the event of panic we get proper gitea 500 pages and the stacktrace is logged with the gitea logger. Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
0f295ababa
commit
ca00ca8ee4
4 changed files with 118 additions and 2 deletions
|
@ -136,7 +136,7 @@ func (ctx *Context) ServerError(title string, err error) {
|
|||
}
|
||||
|
||||
ctx.Data["Title"] = "Internal Server Error"
|
||||
ctx.HTML(404, base.TplName("status/500"))
|
||||
ctx.HTML(http.StatusInternalServerError, base.TplName("status/500"))
|
||||
}
|
||||
|
||||
// NotFoundOrServerError use error check function to determine if the error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue