{"action":"created","issue":{"url":"https://api.github.com/repos/BoltsFramework/Bolts-iOS/issues/87","labels_url":"https://api.github.com/repos/BoltsFramework/Bolts-iOS/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/BoltsFramework/Bolts-iOS/issues/87/comments","events_url":"https://api.github.com/repos/BoltsFramework/Bolts-iOS/issues/87/events","html_url":"https://github.com/BoltsFramework/Bolts-iOS/issues/87","id":65798880,"number":87,"title":"Cancellation trumps error in -[BFTask taskForCompletionOfAllTasks:]","user":{"login":"jhollida24","id":1906598,"avatar_url":"https://avatars.githubusercontent.com/u/1906598?v=3","gravatar_id":"","url":"https://api.github.com/users/jhollida24","html_url":"https://github.com/jhollida24","followers_url":"https://api.github.com/users/jhollida24/followers","following_url":"https://api.github.com/users/jhollida24/following{/other_user}","gists_url":"https://api.github.com/users/jhollida24/gists{/gist_id}","starred_url":"https://api.github.com/users/jhollida24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhollida24/subscriptions","organizations_url":"https://api.github.com/users/jhollida24/orgs","repos_url":"https://api.github.com/users/jhollida24/repos","events_url":"https://api.github.com/users/jhollida24/events{/privacy}","received_events_url":"https://api.github.com/users/jhollida24/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"nlutsenko-fb","id":7162174,"avatar_url":"https://avatars.githubusercontent.com/u/7162174?v=3","gravatar_id":"","url":"https://api.github.com/users/nlutsenko-fb","html_url":"https://github.com/nlutsenko-fb","followers_url":"https://api.github.com/users/nlutsenko-fb/followers","following_url":"https://api.github.com/users/nlutsenko-fb/following{/other_user}","gists_url":"https://api.github.com/users/nlutsenko-fb/gists{/gist_id}","starred_url":"https://api.github.com/users/nlutsenko-fb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nlutsenko-fb/subscriptions","organizations_url":"https://api.github.com/users/nlutsenko-fb/orgs","repos_url":"https://api.github.com/users/nlutsenko-fb/repos","events_url":"https://api.github.com/users/nlutsenko-fb/events{/privacy}","received_events_url":"https://api.github.com/users/nlutsenko-fb/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-04-01T23:19:59Z","updated_at":"2015-04-15T21:31:29Z","closed_at":"2015-04-15T21:31:29Z","body":"I have a scenario where I have many, many network requests to make. I would like to provide a BFTask for the completion of all of them.\r\n\r\nI want to be able to cancel them if necessary. Also, if any of them individually fail, I would like to abort the ones not yet dispatched. They are all scheduled on a BFExecutor built from an NSOperationQueue.\r\n\r\nEach task begins with a check on a shared cancellationToken to see if they should proceed. If the request fails, it returns its error and sets the cancellationToken to true. The remaining tasks in the queue then check the cancellationToken and dutifully return -[BFTask cancelledTask] when they get their turn. \r\n\r\nThe problem is that the continuation block for -[BFTask taskForCompletionOfAllTasks:] gives cancellations precedent over errors. So, the task for the completion of all of them returns a cancelled task instead of an error. There's an important distinction there. I want to message errors in my user experience, but not cancellations.\r\n\r\nI suspect it's intentional, but I don't know why. Is my use of the same cancellation token for canceling and errors discouraged? Or is this something that you could possibly change (to give errors precent over cancellations)?"},"comment":{"url":"https://api.github.com/repos/BoltsFramework/Bolts-iOS/issues/comments/93575077","html_url":"https://github.com/BoltsFramework/Bolts-iOS/issues/87#issuecomment-93575077","issue_url":"https://api.github.com/repos/BoltsFramework/Bolts-iOS/issues/87","id":93575077,"user":{"login":"nlutsenko-fb","id":7162174,"avatar_url":"https://avatars.githubusercontent.com/u/7162174?v=3","gravatar_id":"","url":"https://api.github.com/users/nlutsenko-fb","html_url":"https://github.com/nlutsenko-fb","followers_url":"https://api.github.com/users/nlutsenko-fb/followers","following_url":"https://api.github.com/users/nlutsenko-fb/following{/other_user}","gists_url":"https://api.github.com/users/nlutsenko-fb/gists{/gist_id}","starred_url":"https://api.github.com/users/nlutsenko-fb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nlutsenko-fb/subscriptions","organizations_url":"https://api.github.com/users/nlutsenko-fb/orgs","repos_url":"https://api.github.com/users/nlutsenko-fb/repos","events_url":"https://api.github.com/users/nlutsenko-fb/events{/privacy}","received_events_url":"https://api.github.com/users/nlutsenko-fb/received_events","type":"User","site_admin":false},"created_at":"2015-04-15T21:31:29Z","updated_at":"2015-04-15T21:31:29Z","body":"Fixed by #93 "}}