We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d61ee8a commit 3106f23Copy full SHA for 3106f23
handler.go
@@ -27,7 +27,10 @@ func (h *handler) initRoutes() {
27
}
28
29
func (h *handler) index(w http.ResponseWriter, r *http.Request) {
30
- indexTemplate.Execute(w, r.Host)
+ if err := indexTemplate.Execute(w, r.Host); err != nil {
31
+ http.Error(w, "failed to load a home page", http.StatusInternalServerError)
32
+ return
33
+ }
34
35
36
func (h *handler) chat(w http.ResponseWriter, r *http.Request) {
0 commit comments