mirror of
https://github.com/navidrome/navidrome.git
synced 2026-08-01 07:21:17 +00:00
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.
This commit is contained in:
parent
cabbbc0ced
commit
de2b2e4b78
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user