ui: add error state for catalog api failures

This commit is contained in:
2026-04-22 20:57:09 +02:00
parent c860a1a70a
commit 7e15380638
2 changed files with 27 additions and 2 deletions

View File

@@ -182,10 +182,9 @@ func (h *Handler) HandleAPICatalog(w http.ResponseWriter, r *http.Request) {
}
if jikan.IsRetryableError(err) {
if err := templates.CatalogPlaceholderItems(25).Render(r.Context(), w); err != nil {
if err := templates.CatalogError("Unable to load anime catalog").Render(r.Context(), w); err != nil {
log.Printf("render error: %v", err)
http.Error(w, "Internal Server Error", http.StatusInternalServerError)
return
}
return
}