mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-01 16:07:47 +01:00
Better error handling when cover art cannot be loaded
This commit is contained in:
parent
c6ed0d5377
commit
8a1110044c
2 changed files with 8 additions and 3 deletions
|
|
@ -43,10 +43,10 @@ func (c *MediaRetrievalController) GetCoverArt(w http.ResponseWriter, r *http.Re
|
|||
|
||||
switch {
|
||||
case err == model.ErrNotFound:
|
||||
log.Error(r, err.Error(), "id", id)
|
||||
log.Error(r, "Couldn't find coverArt", "id", id, err)
|
||||
return nil, NewError(responses.ErrorDataNotFound, "Cover not found")
|
||||
case err != nil:
|
||||
log.Error(r, err)
|
||||
log.Error(r, "Error retrieving coverArt", "id", id, err)
|
||||
return nil, NewError(responses.ErrorGeneric, "Internal Error")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue