{"action":"created","comment":{"url":"https://api.github.com/repos/openstax/concept-coach/pulls/comments/46701033","id":46701033,"diff_hunk":"@@ -7,6 +7,20 @@ exercises = require '../exercise/collection'\n tasks = {}\n channel = new EventEmitter2 wildcard: true\n \n+ERRORS_TO_SILENCE = ['page_has_no_exercises']\n+\n+getUnhandledErrors = (errors) ->\n+  otherErrors = _.reject errors, (error) ->\n+    _.indexOf(ERRORS_TO_SILENCE, error.code) > -1\n+\n+handledAllErrors = (otherErrors) ->\n+  _.isEmpty otherErrors\n+\n+checkFailure = (response) ->\n+  if response.data.errors\n+    response.data.errors = getUnhandledErrors(response.data.errors)\n+    response.stopErrorDisplay = handledAllErrors(response.data.errors)\n+\n load = (taskId, data) ->","path":"src/task/collection.coffee","position":18,"original_position":18,"commit_id":"623449871c4bd25e1730c092720b611dc4a079a5","original_commit_id":"623449871c4bd25e1730c092720b611dc4a079a5","user":{"login":"nathanstitt","id":79566,"avatar_url":"https://avatars.githubusercontent.com/u/79566?v=3","gravatar_id":"","url":"https://api.github.com/users/nathanstitt","html_url":"https://github.com/nathanstitt","followers_url":"https://api.github.com/users/nathanstitt/followers","following_url":"https://api.github.com/users/nathanstitt/following{/other_user}","gists_url":"https://api.github.com/users/nathanstitt/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanstitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanstitt/subscriptions","organizations_url":"https://api.github.com/users/nathanstitt/orgs","repos_url":"https://api.github.com/users/nathanstitt/repos","events_url":"https://api.github.com/users/nathanstitt/events{/privacy}","received_events_url":"https://api.github.com/users/nathanstitt/received_events","type":"User","site_admin":false},"body":"I like this... so much so that I think I'll steal it for `courses`","created_at":"2015-12-04T16:33:38Z","updated_at":"2015-12-04T16:33:38Z","html_url":"https://github.com/openstax/concept-coach/pull/51#discussion_r46701033","pull_request_url":"https://api.github.com/repos/openstax/concept-coach/pulls/51","_links":{"self":{"href":"https://api.github.com/repos/openstax/concept-coach/pulls/comments/46701033"},"html":{"href":"https://github.com/openstax/concept-coach/pull/51#discussion_r46701033"},"pull_request":{"href":"https://api.github.com/repos/openstax/concept-coach/pulls/51"}}},"pull_request":{"url":"https://api.github.com/repos/openstax/concept-coach/pulls/51","id":52495552,"html_url":"https://github.com/openstax/concept-coach/pull/51","diff_url":"https://github.com/openstax/concept-coach/pull/51.diff","patch_url":"https://github.com/openstax/concept-coach/pull/51.patch","issue_url":"https://api.github.com/repos/openstax/concept-coach/issues/51","number":51,"state":"open","locked":false,"title":"selectively silence errors from task api endpoint","user":{"login":"pandafulmanda","id":2483873,"avatar_url":"https://avatars.githubusercontent.com/u/2483873?v=3","gravatar_id":"","url":"https://api.github.com/users/pandafulmanda","html_url":"https://github.com/pandafulmanda","followers_url":"https://api.github.com/users/pandafulmanda/followers","following_url":"https://api.github.com/users/pandafulmanda/following{/other_user}","gists_url":"https://api.github.com/users/pandafulmanda/gists{/gist_id}","starred_url":"https://api.github.com/users/pandafulmanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pandafulmanda/subscriptions","organizations_url":"https://api.github.com/users/pandafulmanda/orgs","repos_url":"https://api.github.com/users/pandafulmanda/repos","events_url":"https://api.github.com/users/pandafulmanda/events{/privacy}","received_events_url":"https://api.github.com/users/pandafulmanda/received_events","type":"User","site_admin":false},"body":"'page_has_no_exercises' in particular, fixes #40 and updates #42\r\n\r\n### 'page_has_no_exercises' silenced\r\n![screen shot 2015-12-02 at 11 58 12 pm](https://cloud.githubusercontent.com/assets/2483873/11553177/cb05ca60-9951-11e5-94a8-0d28cd95cdb4.png)\r\n\r\n### fake other error shows\r\n![screen shot 2015-12-03 at 12 03 22 am](https://cloud.githubusercontent.com/assets/2483873/11553178/cb072f36-9951-11e5-87e1-a799fb46cea5.png)","created_at":"2015-12-03T06:07:28Z","updated_at":"2015-12-04T16:33:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fc3a7586cfdd3fd775cbbc877d1f5d3fa99cc63b","assignee":null,"milestone":{"url":"https://api.github.com/repos/openstax/concept-coach/milestones/1","html_url":"https://github.com/openstax/concept-coach/milestones/Post-Elsa%20improvements%20and%20bug%20fixes","labels_url":"https://api.github.com/repos/openstax/concept-coach/milestones/1/labels","id":1440280,"number":1,"title":"Post-Elsa improvements and bug fixes","description":"","creator":{"login":"pandafulmanda","id":2483873,"avatar_url":"https://avatars.githubusercontent.com/u/2483873?v=3","gravatar_id":"","url":"https://api.github.com/users/pandafulmanda","html_url":"https://github.com/pandafulmanda","followers_url":"https://api.github.com/users/pandafulmanda/followers","following_url":"https://api.github.com/users/pandafulmanda/following{/other_user}","gists_url":"https://api.github.com/users/pandafulmanda/gists{/gist_id}","starred_url":"https://api.github.com/users/pandafulmanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pandafulmanda/subscriptions","organizations_url":"https://api.github.com/users/pandafulmanda/orgs","repos_url":"https://api.github.com/users/pandafulmanda/repos","events_url":"https://api.github.com/users/pandafulmanda/events{/privacy}","received_events_url":"https://api.github.com/users/pandafulmanda/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":0,"state":"open","created_at":"2015-12-02T19:38:34Z","updated_at":"2015-12-03T16:11:47Z","due_on":"2015-12-07T06:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/openstax/concept-coach/pulls/51/commits","review_comments_url":"https://api.github.com/repos/openstax/concept-coach/pulls/51/comments","review_comment_url":"https://api.github.com/repos/openstax/concept-coach/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openstax/concept-coach/issues/51/comments","statuses_url":"https://api.github.com/repos/openstax/concept-coach/statuses/623449871c4bd25e1730c092720b611dc4a079a5","head":{"label":"openstax:fix/silence-no-exercises-for-page-errors","ref":"fix/silence-no-exercises-for-page-errors","sha":"623449871c4bd25e1730c092720b611dc4a079a5","user":{"login":"openstax","id":3805549,"avatar_url":"https://avatars.githubusercontent.com/u/3805549?v=3","gravatar_id":"","url":"https://api.github.com/users/openstax","html_url":"https://github.com/openstax","followers_url":"https://api.github.com/users/openstax/followers","following_url":"https://api.github.com/users/openstax/following{/other_user}","gists_url":"https://api.github.com/users/openstax/gists{/gist_id}","starred_url":"https://api.github.com/users/openstax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openstax/subscriptions","organizations_url":"https://api.github.com/users/openstax/orgs","repos_url":"https://api.github.com/users/openstax/repos","events_url":"https://api.github.com/users/openstax/events{/privacy}","received_events_url":"https://api.github.com/users/openstax/received_events","type":"Organization","site_admin":false},"repo":{"id":45049813,"name":"concept-coach","full_name":"openstax/concept-coach","owner":{"login":"openstax","id":3805549,"avatar_url":"https://avatars.githubusercontent.com/u/3805549?v=3","gravatar_id":"","url":"https://api.github.com/users/openstax","html_url":"https://github.com/openstax","followers_url":"https://api.github.com/users/openstax/followers","following_url":"https://api.github.com/users/openstax/following{/other_user}","gists_url":"https://api.github.com/users/openstax/gists{/gist_id}","starred_url":"https://api.github.com/users/openstax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openstax/subscriptions","organizations_url":"https://api.github.com/users/openstax/orgs","repos_url":"https://api.github.com/users/openstax/repos","events_url":"https://api.github.com/users/openstax/events{/privacy}","received_events_url":"https://api.github.com/users/openstax/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openstax/concept-coach","description":"","fork":false,"url":"https://api.github.com/repos/openstax/concept-coach","forks_url":"https://api.github.com/repos/openstax/concept-coach/forks","keys_url":"https://api.github.com/repos/openstax/concept-coach/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openstax/concept-coach/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openstax/concept-coach/teams","hooks_url":"https://api.github.com/repos/openstax/concept-coach/hooks","issue_events_url":"https://api.github.com/repos/openstax/concept-coach/issues/events{/number}","events_url":"https://api.github.com/repos/openstax/concept-coach/events","assignees_url":"https://api.github.com/repos/openstax/concept-coach/assignees{/user}","branches_url":"https://api.github.com/repos/openstax/concept-coach/branches{/branch}","tags_url":"https://api.github.com/repos/openstax/concept-coach/tags","blobs_url":"https://api.github.com/repos/openstax/concept-coach/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openstax/concept-coach/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openstax/concept-coach/git/refs{/sha}","trees_url":"https://api.github.com/repos/openstax/concept-coach/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openstax/concept-coach/statuses/{sha}","languages_url":"https://api.github.com/repos/openstax/concept-coach/languages","stargazers_url":"https://api.github.com/repos/openstax/concept-coach/stargazers","contributors_url":"https://api.github.com/repos/openstax/concept-coach/contributors","subscribers_url":"https://api.github.com/repos/openstax/concept-coach/subscribers","subscription_url":"https://api.github.com/repos/openstax/concept-coach/subscription","commits_url":"https://api.github.com/repos/openstax/concept-coach/commits{/sha}","git_commits_url":"https://api.github.com/repos/openstax/concept-coach/git/commits{/sha}","comments_url":"https://api.github.com/repos/openstax/concept-coach/comments{/number}","issue_comment_url":"https://api.github.com/repos/openstax/concept-coach/issues/comments{/number}","contents_url":"https://api.github.com/repos/openstax/concept-coach/contents/{+path}","compare_url":"https://api.github.com/repos/openstax/concept-coach/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openstax/concept-coach/merges","archive_url":"https://api.github.com/repos/openstax/concept-coach/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openstax/concept-coach/downloads","issues_url":"https://api.github.com/repos/openstax/concept-coach/issues{/number}","pulls_url":"https://api.github.com/repos/openstax/concept-coach/pulls{/number}","milestones_url":"https://api.github.com/repos/openstax/concept-coach/milestones{/number}","notifications_url":"https://api.github.com/repos/openstax/concept-coach/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openstax/concept-coach/labels{/name}","releases_url":"https://api.github.com/repos/openstax/concept-coach/releases{/id}","created_at":"2015-10-27T15:18:51Z","updated_at":"2015-11-06T22:58:07Z","pushed_at":"2015-12-03T23:54:07Z","git_url":"git://github.com/openstax/concept-coach.git","ssh_url":"git@github.com:openstax/concept-coach.git","clone_url":"https://github.com/openstax/concept-coach.git","svn_url":"https://github.com/openstax/concept-coach","homepage":null,"size":8034,"stargazers_count":1,"watchers_count":1,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":18,"forks":0,"open_issues":18,"watchers":1,"default_branch":"master"}},"base":{"label":"openstax:master","ref":"master","sha":"a5812fed04b2d56a898b10b8828802da2ade1f74","user":{"login":"openstax","id":3805549,"avatar_url":"https://avatars.githubusercontent.com/u/3805549?v=3","gravatar_id":"","url":"https://api.github.com/users/openstax","html_url":"https://github.com/openstax","followers_url":"https://api.github.com/users/openstax/followers","following_url":"https://api.github.com/users/openstax/following{/other_user}","gists_url":"https://api.github.com/users/openstax/gists{/gist_id}","starred_url":"https://api.github.com/users/openstax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openstax/subscriptions","organizations_url":"https://api.github.com/users/openstax/orgs","repos_url":"https://api.github.com/users/openstax/repos","events_url":"https://api.github.com/users/openstax/events{/privacy}","received_events_url":"https://api.github.com/users/openstax/received_events","type":"Organization","site_admin":false},"repo":{"id":45049813,"name":"concept-coach","full_name":"openstax/concept-coach","owner":{"login":"openstax","id":3805549,"avatar_url":"https://avatars.githubusercontent.com/u/3805549?v=3","gravatar_id":"","url":"https://api.github.com/users/openstax","html_url":"https://github.com/openstax","followers_url":"https://api.github.com/users/openstax/followers","following_url":"https://api.github.com/users/openstax/following{/other_user}","gists_url":"https://api.github.com/users/openstax/gists{/gist_id}","starred_url":"https://api.github.com/users/openstax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openstax/subscriptions","organizations_url":"https://api.github.com/users/openstax/orgs","repos_url":"https://api.github.com/users/openstax/repos","events_url":"https://api.github.com/users/openstax/events{/privacy}","received_events_url":"https://api.github.com/users/openstax/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openstax/concept-coach","description":"","fork":false,"url":"https://api.github.com/repos/openstax/concept-coach","forks_url":"https://api.github.com/repos/openstax/concept-coach/forks","keys_url":"https://api.github.com/repos/openstax/concept-coach/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openstax/concept-coach/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openstax/concept-coach/teams","hooks_url":"https://api.github.com/repos/openstax/concept-coach/hooks","issue_events_url":"https://api.github.com/repos/openstax/concept-coach/issues/events{/number}","events_url":"https://api.github.com/repos/openstax/concept-coach/events","assignees_url":"https://api.github.com/repos/openstax/concept-coach/assignees{/user}","branches_url":"https://api.github.com/repos/openstax/concept-coach/branches{/branch}","tags_url":"https://api.github.com/repos/openstax/concept-coach/tags","blobs_url":"https://api.github.com/repos/openstax/concept-coach/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openstax/concept-coach/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openstax/concept-coach/git/refs{/sha}","trees_url":"https://api.github.com/repos/openstax/concept-coach/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openstax/concept-coach/statuses/{sha}","languages_url":"https://api.github.com/repos/openstax/concept-coach/languages","stargazers_url":"https://api.github.com/repos/openstax/concept-coach/stargazers","contributors_url":"https://api.github.com/repos/openstax/concept-coach/contributors","subscribers_url":"https://api.github.com/repos/openstax/concept-coach/subscribers","subscription_url":"https://api.github.com/repos/openstax/concept-coach/subscription","commits_url":"https://api.github.com/repos/openstax/concept-coach/commits{/sha}","git_commits_url":"https://api.github.com/repos/openstax/concept-coach/git/commits{/sha}","comments_url":"https://api.github.com/repos/openstax/concept-coach/comments{/number}","issue_comment_url":"https://api.github.com/repos/openstax/concept-coach/issues/comments{/number}","contents_url":"https://api.github.com/repos/openstax/concept-coach/contents/{+path}","compare_url":"https://api.github.com/repos/openstax/concept-coach/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openstax/concept-coach/merges","archive_url":"https://api.github.com/repos/openstax/concept-coach/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openstax/concept-coach/downloads","issues_url":"https://api.github.com/repos/openstax/concept-coach/issues{/number}","pulls_url":"https://api.github.com/repos/openstax/concept-coach/pulls{/number}","milestones_url":"https://api.github.com/repos/openstax/concept-coach/milestones{/number}","notifications_url":"https://api.github.com/repos/openstax/concept-coach/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openstax/concept-coach/labels{/name}","releases_url":"https://api.github.com/repos/openstax/concept-coach/releases{/id}","created_at":"2015-10-27T15:18:51Z","updated_at":"2015-11-06T22:58:07Z","pushed_at":"2015-12-03T23:54:07Z","git_url":"git://github.com/openstax/concept-coach.git","ssh_url":"git@github.com:openstax/concept-coach.git","clone_url":"https://github.com/openstax/concept-coach.git","svn_url":"https://github.com/openstax/concept-coach","homepage":null,"size":8034,"stargazers_count":1,"watchers_count":1,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":18,"forks":0,"open_issues":18,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openstax/concept-coach/pulls/51"},"html":{"href":"https://github.com/openstax/concept-coach/pull/51"},"issue":{"href":"https://api.github.com/repos/openstax/concept-coach/issues/51"},"comments":{"href":"https://api.github.com/repos/openstax/concept-coach/issues/51/comments"},"review_comments":{"href":"https://api.github.com/repos/openstax/concept-coach/pulls/51/comments"},"review_comment":{"href":"https://api.github.com/repos/openstax/concept-coach/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openstax/concept-coach/pulls/51/commits"},"statuses":{"href":"https://api.github.com/repos/openstax/concept-coach/statuses/623449871c4bd25e1730c092720b611dc4a079a5"}}}}