Ability to interrupt automatic retries
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 245
- Forks
- 128
- PR merge metrics
- No merged PRs in 30d
Description
Hello!
My company uses TUSKit with authorization. We provide auth in headers, and as of 3.7.0 are taking advantage of the just-in-time setting of headers (thanks!).
I'd like to request a further enhancement to get notified of errors that will be automatically retried. In our case these are sometimes 401's or 404s, which won't be recovered by simply retrying. These are typically uploads that were enqueued in a previous app session, and are being resumed automatically with expired/invalidated credentials, or against a url that no longer exists.
In the case of 401s, we'd like to await the result of a token refresh before allowing the retries to continue. In the case of 404s we'd like to cancel the upload.
Is that something we could accomplish through a new delegate callback (like uploadShouldRetryAfterError:client:continuationBlock:), or is this something you've considered and intentionally ruled out? If so do you have a recommendation on how to avoid the doomed retries?
Thanks, Andrew
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing TUSKit's automatic retry handling and existing delegate callbacks. Evaluate the proposed uploadShouldRetryAfterError:client:continuationBlock: API against 401 token refreshes and 404 cancellations. Done should let callers decide whether a failed upload retries, waits for refreshed authorization, or is cancelled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile-dev, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100