This commit is contained in:
@@ -151,7 +151,8 @@ func (a *App) render(w http.ResponseWriter, name string, data any) {
|
||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
// base.html defines layout; dashboard.html will invoke it via template inheritance style.
|
||||
if err := a.tmpl.ExecuteTemplate(w, name, data); err != nil {
|
||||
log.Printf("template render error: %v", err)
|
||||
log.Printf("template render error: %v (template: %s, templates dir: %s)", err, name, a.cfg.TemplatesDir)
|
||||
// In production, don't expose internal error details to client
|
||||
http.Error(w, "template render error", http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user