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

RequestChain error handling callback queue #1468

Merged
merged 1 commit into from
Oct 24, 2020
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
13 changes: 6 additions & 7 deletions Sources/Apollo/RequestChain.swift
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,12 @@ public class RequestChain: Cancellable {
}
return
}


additionalHandler.handleErrorAsync(error: error,
chain: self,
request: request,
response: response,
completion: completion)

additionalHandler.handleErrorAsync(error: error, chain: self, request: request, response: response) { [weak self] result in
self?.callbackQueue.async {
completion(result)
}
}
}

/// Handles a resulting value by returning it on the appropriate queue.
Expand Down