summaryrefslogtreecommitdiff
path: root/internal/handlers/main.go
diff options
context:
space:
mode:
authorGrail Finder (aider) <wohilas@gmail.com>2025-04-05 14:41:35 +0300
committerGrail Finder (aider) <wohilas@gmail.com>2025-04-05 14:41:35 +0300
commitad4324a692f623314d6b1ff81983a8d9dc6f9fa2 (patch)
tree9043c6ea46e98a1c61e9d2da78fb5ee686737682 /internal/handlers/main.go
parentbe4b305e4ee83fba5638e4a24fdc6de9808eb4e9 (diff)
fix: update test selectors and template error handling
Diffstat (limited to 'internal/handlers/main.go')
-rw-r--r--internal/handlers/main.go6
1 files changed, 5 insertions, 1 deletions
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")
+ }
}