{"action":"closed","number":727,"pull_request":{"url":"https://api.github.com/repos/caolan/async/pulls/727","id":30547332,"html_url":"https://github.com/caolan/async/pull/727","diff_url":"https://github.com/caolan/async/pull/727.diff","patch_url":"https://github.com/caolan/async/pull/727.patch","issue_url":"https://api.github.com/repos/caolan/async/issues/727","number":727,"state":"closed","locked":false,"title":"Adding an error function called when a worker encounters an error","user":{"login":"Antonhansel","id":4123811,"avatar_url":"https://avatars.githubusercontent.com/u/4123811?v=3","gravatar_id":"","url":"https://api.github.com/users/Antonhansel","html_url":"https://github.com/Antonhansel","followers_url":"https://api.github.com/users/Antonhansel/followers","following_url":"https://api.github.com/users/Antonhansel/following{/other_user}","gists_url":"https://api.github.com/users/Antonhansel/gists{/gist_id}","starred_url":"https://api.github.com/users/Antonhansel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Antonhansel/subscriptions","organizations_url":"https://api.github.com/users/Antonhansel/orgs","repos_url":"https://api.github.com/users/Antonhansel/repos","events_url":"https://api.github.com/users/Antonhansel/events{/privacy}","received_events_url":"https://api.github.com/users/Antonhansel/received_events","type":"User","site_admin":false},"body":"I'm using async.queue to recursively crawl folders on a distant API. \r\nThe workers can push new tasks to the queue.\r\n\r\nFor my use case, the simplest and cleanest way to handle/log errors without stoping the async execution (When the API fails to respond for example) is  to call an error handling function set up the same way of drain();\r\n\r\n````\r\nq.taskQueue.error = function(err) {\r\n      console.log(err);\r\n  };\r\n````\r\n\r\nYou can then handle the error the way you wish.","created_at":"2015-03-05T10:56:52Z","updated_at":"2015-10-25T03:55:37Z","closed_at":"2015-10-25T03:55:37Z","merged_at":null,"merge_commit_sha":"c1fb0003a1bb26901fd70f23e719e16c833b7a3d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/caolan/async/pulls/727/commits","review_comments_url":"https://api.github.com/repos/caolan/async/pulls/727/comments","review_comment_url":"https://api.github.com/repos/caolan/async/pulls/comments{/number}","comments_url":"https://api.github.com/repos/caolan/async/issues/727/comments","statuses_url":"https://api.github.com/repos/caolan/async/statuses/0ccbf2e5407895d50a54f14993c4942b2e08a076","head":{"label":"Antonhansel:queue_error","ref":"queue_error","sha":"0ccbf2e5407895d50a54f14993c4942b2e08a076","user":{"login":"Antonhansel","id":4123811,"avatar_url":"https://avatars.githubusercontent.com/u/4123811?v=3","gravatar_id":"","url":"https://api.github.com/users/Antonhansel","html_url":"https://github.com/Antonhansel","followers_url":"https://api.github.com/users/Antonhansel/followers","following_url":"https://api.github.com/users/Antonhansel/following{/other_user}","gists_url":"https://api.github.com/users/Antonhansel/gists{/gist_id}","starred_url":"https://api.github.com/users/Antonhansel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Antonhansel/subscriptions","organizations_url":"https://api.github.com/users/Antonhansel/orgs","repos_url":"https://api.github.com/users/Antonhansel/repos","events_url":"https://api.github.com/users/Antonhansel/events{/privacy}","received_events_url":"https://api.github.com/users/Antonhansel/received_events","type":"User","site_admin":false},"repo":{"id":31709035,"name":"async","full_name":"Antonhansel/async","owner":{"login":"Antonhansel","id":4123811,"avatar_url":"https://avatars.githubusercontent.com/u/4123811?v=3","gravatar_id":"","url":"https://api.github.com/users/Antonhansel","html_url":"https://github.com/Antonhansel","followers_url":"https://api.github.com/users/Antonhansel/followers","following_url":"https://api.github.com/users/Antonhansel/following{/other_user}","gists_url":"https://api.github.com/users/Antonhansel/gists{/gist_id}","starred_url":"https://api.github.com/users/Antonhansel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Antonhansel/subscriptions","organizations_url":"https://api.github.com/users/Antonhansel/orgs","repos_url":"https://api.github.com/users/Antonhansel/repos","events_url":"https://api.github.com/users/Antonhansel/events{/privacy}","received_events_url":"https://api.github.com/users/Antonhansel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Antonhansel/async","description":"Async utilities for node and the browser","fork":true,"url":"https://api.github.com/repos/Antonhansel/async","forks_url":"https://api.github.com/repos/Antonhansel/async/forks","keys_url":"https://api.github.com/repos/Antonhansel/async/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Antonhansel/async/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Antonhansel/async/teams","hooks_url":"https://api.github.com/repos/Antonhansel/async/hooks","issue_events_url":"https://api.github.com/repos/Antonhansel/async/issues/events{/number}","events_url":"https://api.github.com/repos/Antonhansel/async/events","assignees_url":"https://api.github.com/repos/Antonhansel/async/assignees{/user}","branches_url":"https://api.github.com/repos/Antonhansel/async/branches{/branch}","tags_url":"https://api.github.com/repos/Antonhansel/async/tags","blobs_url":"https://api.github.com/repos/Antonhansel/async/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Antonhansel/async/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Antonhansel/async/git/refs{/sha}","trees_url":"https://api.github.com/repos/Antonhansel/async/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Antonhansel/async/statuses/{sha}","languages_url":"https://api.github.com/repos/Antonhansel/async/languages","stargazers_url":"https://api.github.com/repos/Antonhansel/async/stargazers","contributors_url":"https://api.github.com/repos/Antonhansel/async/contributors","subscribers_url":"https://api.github.com/repos/Antonhansel/async/subscribers","subscription_url":"https://api.github.com/repos/Antonhansel/async/subscription","commits_url":"https://api.github.com/repos/Antonhansel/async/commits{/sha}","git_commits_url":"https://api.github.com/repos/Antonhansel/async/git/commits{/sha}","comments_url":"https://api.github.com/repos/Antonhansel/async/comments{/number}","issue_comment_url":"https://api.github.com/repos/Antonhansel/async/issues/comments{/number}","contents_url":"https://api.github.com/repos/Antonhansel/async/contents/{+path}","compare_url":"https://api.github.com/repos/Antonhansel/async/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Antonhansel/async/merges","archive_url":"https://api.github.com/repos/Antonhansel/async/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Antonhansel/async/downloads","issues_url":"https://api.github.com/repos/Antonhansel/async/issues{/number}","pulls_url":"https://api.github.com/repos/Antonhansel/async/pulls{/number}","milestones_url":"https://api.github.com/repos/Antonhansel/async/milestones{/number}","notifications_url":"https://api.github.com/repos/Antonhansel/async/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Antonhansel/async/labels{/name}","releases_url":"https://api.github.com/repos/Antonhansel/async/releases{/id}","created_at":"2015-03-05T10:36:44Z","updated_at":"2015-03-05T10:49:08Z","pushed_at":"2015-03-05T10:50:27Z","git_url":"git://github.com/Antonhansel/async.git","ssh_url":"git@github.com:Antonhansel/async.git","clone_url":"https://github.com/Antonhansel/async.git","svn_url":"https://github.com/Antonhansel/async","homepage":"","size":751,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"caolan:master","ref":"master","sha":"b0fe15781893bb605b90ced4204175026640b033","user":{"login":"caolan","id":5274,"avatar_url":"https://avatars.githubusercontent.com/u/5274?v=3","gravatar_id":"","url":"https://api.github.com/users/caolan","html_url":"https://github.com/caolan","followers_url":"https://api.github.com/users/caolan/followers","following_url":"https://api.github.com/users/caolan/following{/other_user}","gists_url":"https://api.github.com/users/caolan/gists{/gist_id}","starred_url":"https://api.github.com/users/caolan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caolan/subscriptions","organizations_url":"https://api.github.com/users/caolan/orgs","repos_url":"https://api.github.com/users/caolan/repos","events_url":"https://api.github.com/users/caolan/events{/privacy}","received_events_url":"https://api.github.com/users/caolan/received_events","type":"User","site_admin":false},"repo":{"id":698041,"name":"async","full_name":"caolan/async","owner":{"login":"caolan","id":5274,"avatar_url":"https://avatars.githubusercontent.com/u/5274?v=3","gravatar_id":"","url":"https://api.github.com/users/caolan","html_url":"https://github.com/caolan","followers_url":"https://api.github.com/users/caolan/followers","following_url":"https://api.github.com/users/caolan/following{/other_user}","gists_url":"https://api.github.com/users/caolan/gists{/gist_id}","starred_url":"https://api.github.com/users/caolan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caolan/subscriptions","organizations_url":"https://api.github.com/users/caolan/orgs","repos_url":"https://api.github.com/users/caolan/repos","events_url":"https://api.github.com/users/caolan/events{/privacy}","received_events_url":"https://api.github.com/users/caolan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/caolan/async","description":"Async utilities for node and the browser","fork":false,"url":"https://api.github.com/repos/caolan/async","forks_url":"https://api.github.com/repos/caolan/async/forks","keys_url":"https://api.github.com/repos/caolan/async/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caolan/async/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caolan/async/teams","hooks_url":"https://api.github.com/repos/caolan/async/hooks","issue_events_url":"https://api.github.com/repos/caolan/async/issues/events{/number}","events_url":"https://api.github.com/repos/caolan/async/events","assignees_url":"https://api.github.com/repos/caolan/async/assignees{/user}","branches_url":"https://api.github.com/repos/caolan/async/branches{/branch}","tags_url":"https://api.github.com/repos/caolan/async/tags","blobs_url":"https://api.github.com/repos/caolan/async/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caolan/async/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caolan/async/git/refs{/sha}","trees_url":"https://api.github.com/repos/caolan/async/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caolan/async/statuses/{sha}","languages_url":"https://api.github.com/repos/caolan/async/languages","stargazers_url":"https://api.github.com/repos/caolan/async/stargazers","contributors_url":"https://api.github.com/repos/caolan/async/contributors","subscribers_url":"https://api.github.com/repos/caolan/async/subscribers","subscription_url":"https://api.github.com/repos/caolan/async/subscription","commits_url":"https://api.github.com/repos/caolan/async/commits{/sha}","git_commits_url":"https://api.github.com/repos/caolan/async/git/commits{/sha}","comments_url":"https://api.github.com/repos/caolan/async/comments{/number}","issue_comment_url":"https://api.github.com/repos/caolan/async/issues/comments{/number}","contents_url":"https://api.github.com/repos/caolan/async/contents/{+path}","compare_url":"https://api.github.com/repos/caolan/async/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caolan/async/merges","archive_url":"https://api.github.com/repos/caolan/async/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caolan/async/downloads","issues_url":"https://api.github.com/repos/caolan/async/issues{/number}","pulls_url":"https://api.github.com/repos/caolan/async/pulls{/number}","milestones_url":"https://api.github.com/repos/caolan/async/milestones{/number}","notifications_url":"https://api.github.com/repos/caolan/async/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caolan/async/labels{/name}","releases_url":"https://api.github.com/repos/caolan/async/releases{/id}","created_at":"2010-06-01T21:01:30Z","updated_at":"2015-10-25T01:48:42Z","pushed_at":"2015-10-25T02:47:35Z","git_url":"git://github.com/caolan/async.git","ssh_url":"git@github.com:caolan/async.git","clone_url":"https://github.com/caolan/async.git","svn_url":"https://github.com/caolan/async","homepage":"","size":5336,"stargazers_count":14975,"watchers_count":14975,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1487,"mirror_url":null,"open_issues_count":58,"forks":1487,"open_issues":58,"watchers":14975,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/caolan/async/pulls/727"},"html":{"href":"https://github.com/caolan/async/pull/727"},"issue":{"href":"https://api.github.com/repos/caolan/async/issues/727"},"comments":{"href":"https://api.github.com/repos/caolan/async/issues/727/comments"},"review_comments":{"href":"https://api.github.com/repos/caolan/async/pulls/727/comments"},"review_comment":{"href":"https://api.github.com/repos/caolan/async/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/caolan/async/pulls/727/commits"},"statuses":{"href":"https://api.github.com/repos/caolan/async/statuses/0ccbf2e5407895d50a54f14993c4942b2e08a076"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":3,"review_comments":0,"commits":2,"additions":4,"deletions":0,"changed_files":1}}