diff options
Diffstat (limited to 'http_error_page.go')
-rw-r--r-- | http_error_page.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/http_error_page.go b/http_error_page.go index 0ddf055..355b504 100644 --- a/http_error_page.go +++ b/http_error_page.go @@ -18,6 +18,12 @@ func errorPage400(w http.ResponseWriter, params map[string]any, msg string) { _ = templates.ExecuteTemplate(w, "400", params) } +func errorPage403(w http.ResponseWriter, params map[string]any, msg string) { + w.WriteHeader(http.StatusForbidden) + params["complete_error_msg"] = msg + _ = templates.ExecuteTemplate(w, "403", params) +} + func errorPage451(w http.ResponseWriter, params map[string]any, msg string) { w.WriteHeader(http.StatusUnavailableForLegalReasons) params["complete_error_msg"] = msg @@ -29,3 +35,8 @@ func errorPage500(w http.ResponseWriter, params map[string]any, msg string) { params["complete_error_msg"] = msg _ = templates.ExecuteTemplate(w, "500", params) } + +func errorPage501(w http.ResponseWriter, params map[string]any) { + w.WriteHeader(http.StatusNotImplemented) + _ = templates.ExecuteTemplate(w, "501", params) +} |