From ad4324a692f623314d6b1ff81983a8d9dc6f9fa2 Mon Sep 17 00:00:00 2001 From: "Grail Finder (aider)" Date: Sat, 5 Apr 2025 14:41:35 +0300 Subject: fix: update test selectors and template error handling --- internal/handlers/main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'internal/handlers/main.go') diff --git a/internal/handlers/main.go b/internal/handlers/main.go index c4222f4..7e3bfa0 100644 --- a/internal/handlers/main.go +++ b/internal/handlers/main.go @@ -75,5 +75,9 @@ func (h *Handlers) MainPage(w http.ResponseWriter, r *http.Request) { Option4: "Habt", CorrectIndex: 1, } - tmpl.ExecuteTemplate(w, "main", testQuestion) + err = tmpl.ExecuteTemplate(w, "main", testQuestion) + if err != nil { + h.log.Error("failed to render template", "error", err) + abortWithError(w, "Failed to render page") + } } -- cgit v1.2.3