handle the template execution error

This commit is contained in:
Aaron Bieber 2021-05-19 21:15:46 -06:00
parent e38b3cbc23
commit 4ce5ad6a00

View File

@ -252,6 +252,10 @@ func main() {
l.User = user
}
err = templ.ExecuteTemplate(w, "landing", l)
if err != nil {
log.Println(err)
http.Error(w, err.Error(), http.StatusInternalServerError)
}
}
}
}))