From 1c21474ff60257fc489c65fb35cd6ba864c18a17 Mon Sep 17 00:00:00 2001 From: mkelvers Date: Sat, 20 Jun 2026 18:28:45 +0200 Subject: [PATCH] Handle relation refresh errors --- integrations/jikan/relations.go | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/integrations/jikan/relations.go b/integrations/jikan/relations.go index 8dae766..62f56e0 100644 --- a/integrations/jikan/relations.go +++ b/integrations/jikan/relations.go @@ -139,7 +139,15 @@ func (c *Client) refreshWatchOrder(ctx context.Context, id int) (watchorder.Watc func (c *Client) refreshWatchOrderAsync(id int) { c.runAsyncRefresh(func(ctx context.Context) { - _, _ = c.refreshWatchOrder(ctx, id) + if _, err := c.refreshWatchOrder(ctx, id); err != nil { + observability.Warn( + "relations_watch_order_async_refresh_failed", + "jikan", + "", + map[string]any{"anime_id": id}, + err, + ) + } }) } @@ -261,7 +269,9 @@ func (c *Client) fetchRelationEntries(ctx context.Context, entries []watchorder. } go func() { - _ = g.Wait() + if err := g.Wait(); err != nil { + observability.Warn("relations_fetch_group_failed", "jikan", "", nil, err) + } close(results) }() @@ -359,6 +369,14 @@ func (c *Client) GetFullRelations(ctx context.Context, id int, mode WatchOrderMo func (c *Client) WarmFullRelations(id int) { c.runAsyncRefresh(func(ctx context.Context) { - _, _ = c.GetFullRelations(ctx, id, WatchOrderModeMain) + if _, err := c.GetFullRelations(ctx, id, WatchOrderModeMain); err != nil { + observability.Warn( + "relations_warm_full_failed", + "jikan", + "", + map[string]any{"anime_id": id}, + err, + ) + } }) }