Skip to content

core: identify failed spclient routes safely - #1739

Draft
dereksix wants to merge 1 commit into
librespot-org:devfrom
dereksix:agent/spclient-failure-diagnostics
Draft

dereksix wants to merge 1 commit into
librespot-org:devfrom
dereksix:agent/spclient-failure-diagnostics

Conversation

@dereksix

Copy link
Copy Markdown

What changed

  • Emit one warning after an spclient request exhausts its retry strategy.
  • Include only the HTTP method, path-only endpoint, attempt count, and broad ErrorKind.
  • Strip query strings and omit headers, bodies, tokens, and the underlying error detail.
  • Add a regression test for endpoint sanitization.

Why

Previously the final request error was returned without enough route context to distinguish failures in storage resolution, context/autoplay, playlists, or Connect state. That made intermittent Spotify failures difficult to diagnose without enabling much noisier debug logging.

This is observability-only; it does not change request construction, retry behavior, access-point rotation, or error propagation.

Validation

  • cargo fmt --all -- --check
  • cargo test -p librespot-core (17 unit tests, Connect integration test, and doctests passed)
  • cargo clippy -p librespot-core --all-targets -- -D warnings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant