Skip to content

Document asyncTaskContextCancelled request error reason#2520

Merged
onevcat merged 1 commit intomasterfrom
docs/async-task-context-cancelled
Apr 18, 2026
Merged

Document asyncTaskContextCancelled request error reason#2520
onevcat merged 1 commit intomasterfrom
docs/async-task-context-cancelled

Conversation

@onevcat
Copy link
Copy Markdown
Owner

@onevcat onevcat commented Apr 18, 2026

Summary

  • Add a doc comment to RequestErrorReason.asyncTaskContextCancelled so it matches the documentation style of the surrounding cases (taskCancelled, livePhotoTaskCancelled, dataProviderCancelled).
  • Explain when the case is emitted (the async retrieveImage overloads in KingfisherManager, when the surrounding Task is cancelled before a URLSessionTask is attached — e.g. cache hits, ImageDataProvider loads, or pre-launch cancellations) and how it relates to taskCancelled.
  • Documents the Error Code: 1005 mapping that already exists in errorCode.

This is a follow-up to #2519, which highlighted that the case had no DocC comment.

Test plan

  • swift build

Adds a doc comment explaining when this case is emitted, how it relates
to `taskCancelled`, and confirms the `Error Code: 1005` mapping.
@onevcat onevcat merged commit 719494d into master Apr 18, 2026
34 of 56 checks passed
@onevcat onevcat deleted the docs/async-task-context-cancelled branch April 18, 2026 09:29
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