feat: update some errorhandling #161
This commit is contained in:
@@ -23,6 +23,10 @@ func HandleIndexAnd404(db *sql.DB) http.HandlerFunc {
|
||||
comp = template.Layout(template.Index(), userComp)
|
||||
}
|
||||
|
||||
comp.Render(r.Context(), w)
|
||||
err := comp.Render(r.Context(), w)
|
||||
if err != nil {
|
||||
utils.LogError("Failed to render index", err)
|
||||
http.Error(w, "Failed to render index", http.StatusInternalServerError)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user