fix: handle jikan rate limits gracefully instead of dropping data

This commit is contained in:
2026-04-08 17:17:14 +02:00
parent 44a0e9499d
commit 22955c0018
2 changed files with 13 additions and 9 deletions

View File

@@ -79,8 +79,9 @@ func (s *Service) GetWatchingAnime(ctx context.Context, userID string) ([]templa
for _, row := range rows {
anime, err := s.jikanClient.GetAnimeByID(int(row.AnimeID))
if err != nil {
// Skip if we can't fetch anime details
continue
// Instead of skipping, we still append it, but without the extra Jikan details
// This prevents anime from vanishing from the watchlist when Jikan rate limits us.
anime = jikan.Anime{}
}
result = append(result, templates.WatchingAnimeWithDetails{
Entry: row,