From dd33c6ab5e1bc7707faaeb9c2d5db999f8cb65d4 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Tue, 10 Feb 2026 00:22:33 +0000 Subject: [PATCH] Add missing error page --- rmo/error.go | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 rmo/error.go diff --git a/rmo/error.go b/rmo/error.go new file mode 100644 index 00000000..7b18aad5 --- /dev/null +++ b/rmo/error.go @@ -0,0 +1,32 @@ +package rmo + +import ( + "net/http" + + //"github.com/Gleipnir-Technology/nidus-sync/config" + "github.com/Gleipnir-Technology/nidus-sync/html" +) + +type ContentError struct { + Code string + District *ContentDistrict + URL ContentURL +} + +func getError(w http.ResponseWriter, r *http.Request) { + code := r.FormValue("code") + district, err := districtBySlug(r) + if err != nil { + //respondError(w, "Failed to lookup organization", err, http.StatusBadRequest) + district = nil + } + html.RenderOrError( + w, + "rmo/error.html", + ContentError{ + Code: code, + District: newContentDistrict(district), + URL: makeContentURL(nil), + }, + ) +}