From 1f185f329bb82c87b250fb2312ae873d69a20d38 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 22 Mar 2025 13:59:00 +0800 Subject: Use a custom errPage500 --- http_handle_repo_log.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'http_handle_repo_log.go') diff --git a/http_handle_repo_log.go b/http_handle_repo_log.go index 8d54d28..fbae0d5 100644 --- a/http_handle_repo_log.go +++ b/http_handle_repo_log.go @@ -21,12 +21,12 @@ func httpHandleRepoLog(writer http.ResponseWriter, _ *http.Request, params map[s repo = params["repo"].(*git.Repository) if refHash, err = getRefHash(repo, params["ref_type"].(string), params["ref_name"].(string)); err != nil { - http.Error(writer, "Error getting ref hash: "+err.Error(), http.StatusInternalServerError) + errorPage500(writer, params, "Error getting ref hash: "+err.Error()) return } if commits, err = getRecentCommits(repo, refHash, -1); err != nil { - http.Error(writer, "Error getting recent commits: "+err.Error(), http.StatusInternalServerError) + errorPage500(writer, params, "Error getting recent commits: "+err.Error()) return } params["commits"] = commits -- cgit v1.2.3