From de2b2e4b7831b712ff712a4292123d05c18fadd5 Mon Sep 17 00:00:00 2001 From: Deluan Date: Sun, 26 Jul 2026 01:07:39 -0400 Subject: [PATCH] fix(artwork): log why a sized cover fell back to the placeholder serveHash routed every non-cancel cache error into dangling(), which returns ErrUnavailable and is then rendered as a placeholder at 200 OK. A cache-layer fault was therefore indistinguishable from an album genuinely having no artwork, and left no trace: a broken resize cache silently served placeholders for a quarter of the library while the logs stayed clean. Log the error before falling back, so the cause is recoverable from the logs. --- core/artwork/serving.go | 1 + 1 file changed, 1 insertion(+) diff --git a/core/artwork/serving.go b/core/artwork/serving.go index ecefd133b..073159f44 100644 --- a/core/artwork/serving.go +++ b/core/artwork/serving.go @@ -142,6 +142,7 @@ func (s *service) serveHash(ctx context.Context, artID model.ArtworkID, ia *mode if errors.Is(err, context.Canceled) { return nil, err } + log.Warn(ctx, "artwork: could not serve resized image", "artID", artID, "size", size, err) return s.dangling(ctx, artID) } return &Image{ReadCloser: stream, Hash: ia.Hash, ETag: representationTag(ia.Hash, size, square), LastUpdated: ia.UpdatedAt}, nil