Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Sources/General/KingfisherError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,20 @@ public enum KingfisherError: Error {
/// Error Code: 1004
case livePhotoTaskCancelled(source: LivePhotoSource)

/// The async `retrieveImage` call was cancelled before its underlying download task was attached.
///
/// Emitted from the `async` overloads of ``KingfisherManager/retrieveImage(with:options:progressBlock:)``
/// (and their internal variants) when the enclosing Swift `Task` is cancelled during the bridge
/// between the continuation-based and async/await execution paths, and no concrete
/// ``SessionDataTask`` is yet available to attach the cancellation to. This typically happens when
/// the request is satisfied without ever starting a `URLSessionTask` — for example, when it is
/// served from the cache or by an ``ImageDataProvider``, or when the cancellation arrives before
/// the network task has been created.
///
/// When a `URLSessionTask` is already in flight at the moment of cancellation,
/// ``RequestErrorReason/taskCancelled(task:token:)`` is reported instead.
///
/// Error Code: 1005
case asyncTaskContextCancelled

/// The loading task of an ``ImageDataProvider`` was cancelled.
Expand Down
Loading