aboutsummaryrefslogtreecommitdiff
path: root/http_handle_repo_log.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-03-22 13:59:00 +0800
committerRunxi Yu <me@runxiyu.org>2025-03-22 13:59:00 +0800
commit1f185f329bb82c87b250fb2312ae873d69a20d38 (patch)
tree892ad487e7e1154fcb71fbe05acf9e583592e96b /http_handle_repo_log.go
parentVariable name lengths (diff)
downloadforge-1f185f329bb82c87b250fb2312ae873d69a20d38.tar.gz
forge-1f185f329bb82c87b250fb2312ae873d69a20d38.tar.zst
forge-1f185f329bb82c87b250fb2312ae873d69a20d38.zip
Use a custom errPage500
Diffstat (limited to 'http_handle_repo_log.go')
-rw-r--r--http_handle_repo_log.go4
1 files changed, 2 insertions, 2 deletions
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