aboutsummaryrefslogtreecommitdiff
path: root/http_handle_repo_contrib_index.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_contrib_index.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_contrib_index.go')
-rw-r--r--http_handle_repo_contrib_index.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/http_handle_repo_contrib_index.go b/http_handle_repo_contrib_index.go
index af3f8b6..caffbe9 100644
--- a/http_handle_repo_contrib_index.go
+++ b/http_handle_repo_contrib_index.go
@@ -24,7 +24,7 @@ func httpHandleRepoContribIndex(writer http.ResponseWriter, request *http.Reques
"SELECT id, COALESCE(title, 'Untitled'), status FROM merge_requests WHERE repo_id = $1",
params["repo_id"],
); err != nil {
- http.Error(writer, "Error querying merge requests: "+err.Error(), http.StatusInternalServerError)
+ errorPage500(writer, params, "Error querying merge requests: "+err.Error())
return
}
defer rows.Close()
@@ -33,13 +33,13 @@ func httpHandleRepoContribIndex(writer http.ResponseWriter, request *http.Reques
var mrID int
var mrTitle, mrStatus string
if err = rows.Scan(&mrID, &mrTitle, &mrStatus); err != nil {
- http.Error(writer, "Error scanning merge request: "+err.Error(), http.StatusInternalServerError)
+ errorPage500(writer, params, "Error scanning merge request: "+err.Error())
return
}
result = append(result, idTitleStatus{mrID, mrTitle, mrStatus})
}
if err = rows.Err(); err != nil {
- http.Error(writer, "Error ranging over merge requests: "+err.Error(), http.StatusInternalServerError)
+ errorPage500(writer, params, "Error ranging over merge requests: "+err.Error())
return
}
params["merge_requests"] = result