aboutsummaryrefslogtreecommitdiff
path: root/http_error_page.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_error_page.go
parentVariable name lengths (diff)
downloadforge-1f185f329bb82c87b250fb2312ae873d69a20d38.tar.gz
forge-1f185f329bb82c87b250fb2312ae873d69a20d38.tar.zst
forge-1f185f329bb82c87b250fb2312ae873d69a20d38.zip
Use a custom errPage500
Diffstat (limited to 'http_error_page.go')
-rw-r--r--http_error_page.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/http_error_page.go b/http_error_page.go
index 77fdc86..0ddf055 100644
--- a/http_error_page.go
+++ b/http_error_page.go
@@ -23,3 +23,9 @@ func errorPage451(w http.ResponseWriter, params map[string]any, msg string) {
params["complete_error_msg"] = msg
_ = templates.ExecuteTemplate(w, "451", params)
}
+
+func errorPage500(w http.ResponseWriter, params map[string]any, msg string) {
+ w.WriteHeader(http.StatusInternalServerError)
+ params["complete_error_msg"] = msg
+ _ = templates.ExecuteTemplate(w, "500", params)
+}