chore(server): add more info to scrobble errors logs (#3889)

* chore(server): add more info to scrobble errors

Signed-off-by: Deluan <deluan@navidrome.org>

* chore(server): add more info to scrobble errors

Signed-off-by: Deluan <deluan@navidrome.org>

* chore(server): add more info to scrobble errors

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan Quintão 2025-03-27 18:57:06 -04:00 committed by GitHub
parent 46a2ec0ba1
commit 5ab345c83e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 22 additions and 13 deletions

View file

@ -49,16 +49,18 @@ func (c *HTTPClient) Do(req *http.Request) (*http.Response, error) {
cached = false
req, err := c.deserializeReq(key)
if err != nil {
log.Trace(req.Context(), "CachedHTTPClient.Do", "key", key, err)
return "", 0, err
}
resp, err := c.hc.Do(req)
if err != nil {
log.Trace(req.Context(), "CachedHTTPClient.Do", "req", req, err)
return "", 0, err
}
defer resp.Body.Close()
return c.serializeResponse(resp), c.ttl, nil
})
log.Trace(req.Context(), "CachedHTTPClient.Do", "key", key, "cached", cached, "elapsed", time.Since(start))
log.Trace(req.Context(), "CachedHTTPClient.Do", "key", key, "cached", cached, "elapsed", time.Since(start), err)
if err != nil {
return nil, err
}