fix(relations): ignore canceled context noise

This commit is contained in:
2026-04-19 01:11:34 +02:00
parent 14cb3b3a0f
commit f4c43e4723
2 changed files with 6 additions and 0 deletions

View File

@@ -194,6 +194,9 @@ func (h *Handler) HandleAPIAnime(w http.ResponseWriter, r *http.Request) {
case "relations":
relations, err := h.svc.GetRelations(r.Context(), id)
if err != nil {
if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {
return
}
log.Printf("relations error for %d: %v", id, err)
writeInlineLoadError(w, "Failed to load relations.")
return

View File

@@ -114,6 +114,9 @@ func (c *Client) GetFullRelations(ctx context.Context, id int) ([]RelationEntry,
anime, err := c.GetAnimeByID(ctx, watchOrderEntry.ID)
if err != nil {
if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {
continue
}
c.EnqueueAnimeFetchRetry(ctx, watchOrderEntry.ID, err)
log.Printf("relations: skipping related anime %d for root %d: %v", watchOrderEntry.ID, id, err)
continue