1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-06 10:37:20 +00:00

Do not show 500 error when default branch doesn't exist (#34096)

Fix #34090
This commit is contained in:
wxiaoguang
2025-04-02 12:39:00 +08:00
committed by GitHub
parent 88352e0b25
commit 6ed1b26c58
5 changed files with 36 additions and 4 deletions

View File

@ -150,7 +150,7 @@ func (ctx *Context) notFoundInternal(logMsg string, logErr error) {
ctx.Data["IsRepo"] = ctx.Repo.Repository != nil
ctx.Data["Title"] = "Page Not Found"
ctx.HTML(http.StatusNotFound, templates.TplName("status/404"))
ctx.HTML(http.StatusNotFound, "status/404")
}
// ServerError displays a 500 (Internal Server Error) page and prints the given error, if any.