fix: handle 5xx server errors with retry message in playback network#178
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves resiliency of playback polling by detecting Spotify server-side 5xx failures during me/player fetches and showing a user-facing “retrying” status message instead of surfacing the error immediately. It also performs a small test-module import reordering for cleanliness.
Changes:
- Add special-case handling for Spotify 5xx (502/503/504 + reason phrases) during playback polling to show a retry status and avoid error escalation.
- Reset playback polling timer on 5xx errors to trigger an automatic retry on the next poll interval.
- Reorder imports in
src/core/app.rstest module.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/infra/network/playback.rs |
Adds 5xx detection and user-friendly retry messaging in current playback polling error path. |
src/core/app.rs |
Adjusts import ordering inside the #[cfg(test)] module. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request primarily improves error handling for Spotify server errors in playback networking, and makes a minor import order fix in the test module. The most significant change is the addition of user-friendly messaging and retry logic for temporary Spotify server issues.
Playback network error handling improvements:
Network's playback error handling. When such an error is detected, a clear status message is shown to the user, and polling is automatically retried after a short delay, improving user experience during transient outages.Test module cleanup:
src/core/app.rsby moving thetest_helpersimport to follow the module declaration, improving code organization.