1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-04 00:28:36 +00:00

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

Backport #34096
This commit is contained in:
wxiaoguang
2025-04-02 18:16:41 +08:00
committed by GitHub
parent 25e409e025
commit 8f75f61b64
6 changed files with 49 additions and 4 deletions

View File

@@ -151,7 +151,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, base.TplName("status/404"))
ctx.HTML(http.StatusNotFound, "status/404")
}
// ServerError displays a 500 (Internal Server Error) page and prints the given error, if any.