Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(LockCachingAudioSource): add network error handling #1398

Draft
wants to merge 15 commits into
base: minor
Choose a base branch
from

Conversation

danielgomezriconeon
Copy link

@danielgomezriconeon danielgomezriconeon commented Jan 29, 2025

Try to fix:

Done:

  • Add retry mechanism for _fetch
  • Do not throw exceptions on query but return Future with errors so caller could handle them gracefully

@danielgomezriconeon danielgomezriconeon marked this pull request as ready for review February 5, 2025 20:34
@danielgomezriconeon danielgomezriconeon force-pushed the feat/caching-error-handling branch from 59c9929 to 1a04045 Compare February 5, 2025 20:42
@danielgomezriconeon danielgomezriconeon marked this pull request as draft February 5, 2025 21:32
@danielgomezriconeon
Copy link
Author

@ryanheise I'm having troubles trying to test multiple scenarios, can you please give me a hint?

I added a retry logic on the fetch method, but that's running without awaiting it.

And for some reason, if an exception is thrown there or the future returns an error, it is not being propagated to the main await, where:
https://github.com/ryanheise/just_audio/pull/1398/files#diff-1425e2b963b2b8d4c9fde51b8fabf85b624477e9373c365a72bea2aa6071990bR137-R143

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