diff options
Diffstat (limited to 'internal/handlers/main.go')
-rw-r--r-- | internal/handlers/main.go | 6 |
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") + } } |