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

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

No files matched your search

+1 -1
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.