Skip to content

Commit

Permalink
Merge pull request #1468 from kiva/error-queue
Browse files Browse the repository at this point in the history
RequestChain error handling callback queue
  • Loading branch information
designatednerd authored Oct 24, 2020
2 parents 7a8f2bc + 2c275c1 commit 4bf0714
Showing 1 changed file with 6 additions and 7 deletions.
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

0 comments on commit 4bf0714

Please sign in to comment.