LoadErrorHandlingPolicy for DownloadManager
Open
enhancement
- Dominant language
- Java
- Stars
- 21.9k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
### [REQUIRED] Use case description
I don't want to retry 4xx errors for the download requests, but 5xx errors I would like to retry with exponential backoff, just as it is already done inside `DownloadManager`.
### Proposed solution
Inject a `LoadErrorHandlingPolicy` to `DownloadManager`, similarly to how `minRetryCount` is added.
### Alternatives considered
- Set `minRetryCount` to 0 and handle it myself inside an implementation of Downloader, but this feels kinda backwards.
Note: This is very similar to https://github.com/google/ExoPlayer/issues/6334
Contributor guide
Assessment
This issue has not been assessed yet.