{"action":"created","comment":{"url":"https://api.github.com/repos/angular/material/pulls/comments/63577408","id":63577408,"diff_hunk":"@@ -514,29 +510,39 @@ describe('MdIcon service', function() {\n     });\n \n     describe('icon group is not found', function() {\n-      it('should log Error', function() {\n-        var msg;\n-        try {\n-          $mdIcon('notfound:someIcon')\n-            .catch(function(error) {\n-              msg = error.data;\n-            });\n+      it('should log Error and reject', inject(function($log) {\n+        var errorMessage = 'Cannot GET notfoundgroup.svg';\n+        var caughtRejection = false;\n+\n+        $mdIcon('notfound:someIcon')\n+          .catch(function(error) {\n+            expect(error.data).toBe(errorMessage);\n+            caughtRejection = true;\n+          });\n \n-          $httpBackend.flush();\n-        } finally {\n-          expect(msg).toEqual('Cannot GET notfoundgroup.svg');\n-        }\n-      });\n+        $httpBackend.flush();\n+\n+        expect(caughtRejection).toBe(true);\n+        expect($log.warn.logs[0]).toEqual([errorMessage]);\n+      }));\n     });\n \n     describe('icon is not found', function() {\n-      it('should not throw Error', function() {\n-        expect(function(){\n-          $mdIcon('notfound');\n+      it('should log Error and reject', inject(function($log) {","path":"src/components/icon/icon.spec.js","position":109,"original_position":109,"commit_id":"8354b3477cb8a1a0df7fe4b07b1dc35aaf3e9020","original_commit_id":"8354b3477cb8a1a0df7fe4b07b1dc35aaf3e9020","user":{"login":"topherfangio","id":54370,"avatar_url":"https://avatars.githubusercontent.com/u/54370?v=3","gravatar_id":"","url":"https://api.github.com/users/topherfangio","html_url":"https://github.com/topherfangio","followers_url":"https://api.github.com/users/topherfangio/followers","following_url":"https://api.github.com/users/topherfangio/following{/other_user}","gists_url":"https://api.github.com/users/topherfangio/gists{/gist_id}","starred_url":"https://api.github.com/users/topherfangio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/topherfangio/subscriptions","organizations_url":"https://api.github.com/users/topherfangio/orgs","repos_url":"https://api.github.com/users/topherfangio/repos","events_url":"https://api.github.com/users/topherfangio/events{/privacy}","received_events_url":"https://api.github.com/users/topherfangio/received_events","type":"User","site_admin":false},"body":"The original behavior in 1.3, 1.4 and 1.5 was to not throw any error if the user called `$mdIcon()` with an unknown icon. Since 1.6 was going to throw a PUR, we decided to update the test to just check for the specific error (to account for 1.6) and instruct users to use `.catch()` or disable the new PUR checks if they wanted the old pre 1.6 behavior.\r\n\r\n@ThomasBurleson Any thoughts on whether we should keep the \"don't throw an error\" behavior, or if we should make a breaking change to say that it will now throw an error/reject which should always be caught?","created_at":"2016-05-17T18:26:57Z","updated_at":"2016-05-17T18:26:58Z","html_url":"https://github.com/angular/material/pull/8468#discussion_r63577408","pull_request_url":"https://api.github.com/repos/angular/material/pulls/8468","_links":{"self":{"href":"https://api.github.com/repos/angular/material/pulls/comments/63577408"},"html":{"href":"https://github.com/angular/material/pull/8468#discussion_r63577408"},"pull_request":{"href":"https://api.github.com/repos/angular/material/pulls/8468"}}},"pull_request":{"url":"https://api.github.com/repos/angular/material/pulls/8468","id":70171852,"html_url":"https://github.com/angular/material/pull/8468","diff_url":"https://github.com/angular/material/pull/8468.diff","patch_url":"https://github.com/angular/material/pull/8468.patch","issue_url":"https://api.github.com/repos/angular/material/issues/8468","number":8468,"state":"closed","locked":false,"title":"fix($mdIcon): prevent \"Possibly unhandled rejection\" errors","user":{"login":"gkalpak","id":8604205,"avatar_url":"https://avatars.githubusercontent.com/u/8604205?v=3","gravatar_id":"","url":"https://api.github.com/users/gkalpak","html_url":"https://github.com/gkalpak","followers_url":"https://api.github.com/users/gkalpak/followers","following_url":"https://api.github.com/users/gkalpak/following{/other_user}","gists_url":"https://api.github.com/users/gkalpak/gists{/gist_id}","starred_url":"https://api.github.com/users/gkalpak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkalpak/subscriptions","organizations_url":"https://api.github.com/users/gkalpak/orgs","repos_url":"https://api.github.com/users/gkalpak/repos","events_url":"https://api.github.com/users/gkalpak/events{/privacy}","received_events_url":"https://api.github.com/users/gkalpak/received_events","type":"User","site_admin":false},"body":"The `announceNotFound()` function was creating and returning a rejected promise that was neither\r\nhandled nor exposed to the user, causing \"Possibly unhandled rejection\" errors.\r\n\r\nThis should fix the failing tests against Angular snapshot on CI.\r\n\r\n<sub>\r\nThis PR also includes a `refactor` commit (removing some unnecessary module loading and making whitespace a little more consistent :stuck_out_tongue:) and a `test` commit that more thoroughly covers the actual behavior when icons/groups are not found (i.e. logging + rejecting).\r\n</sub>","created_at":"2016-05-16T09:35:10Z","updated_at":"2016-05-17T18:26:58Z","closed_at":"2016-05-16T15:59:18Z","merged_at":null,"merge_commit_sha":"e22910a7b6e7856b2919bed0c07f5bab084a1e08","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/angular/material/pulls/8468/commits","review_comments_url":"https://api.github.com/repos/angular/material/pulls/8468/comments","review_comment_url":"https://api.github.com/repos/angular/material/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/material/issues/8468/comments","statuses_url":"https://api.github.com/repos/angular/material/statuses/8354b3477cb8a1a0df7fe4b07b1dc35aaf3e9020","head":{"label":"gkalpak:fix-mdIcon-unhandled-rejection-errors","ref":"fix-mdIcon-unhandled-rejection-errors","sha":"8354b3477cb8a1a0df7fe4b07b1dc35aaf3e9020","user":{"login":"gkalpak","id":8604205,"avatar_url":"https://avatars.githubusercontent.com/u/8604205?v=3","gravatar_id":"","url":"https://api.github.com/users/gkalpak","html_url":"https://github.com/gkalpak","followers_url":"https://api.github.com/users/gkalpak/followers","following_url":"https://api.github.com/users/gkalpak/following{/other_user}","gists_url":"https://api.github.com/users/gkalpak/gists{/gist_id}","starred_url":"https://api.github.com/users/gkalpak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkalpak/subscriptions","organizations_url":"https://api.github.com/users/gkalpak/orgs","repos_url":"https://api.github.com/users/gkalpak/repos","events_url":"https://api.github.com/users/gkalpak/events{/privacy}","received_events_url":"https://api.github.com/users/gkalpak/received_events","type":"User","site_admin":false},"repo":{"id":27148849,"name":"material","full_name":"gkalpak/material","owner":{"login":"gkalpak","id":8604205,"avatar_url":"https://avatars.githubusercontent.com/u/8604205?v=3","gravatar_id":"","url":"https://api.github.com/users/gkalpak","html_url":"https://github.com/gkalpak","followers_url":"https://api.github.com/users/gkalpak/followers","following_url":"https://api.github.com/users/gkalpak/following{/other_user}","gists_url":"https://api.github.com/users/gkalpak/gists{/gist_id}","starred_url":"https://api.github.com/users/gkalpak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkalpak/subscriptions","organizations_url":"https://api.github.com/users/gkalpak/orgs","repos_url":"https://api.github.com/users/gkalpak/repos","events_url":"https://api.github.com/users/gkalpak/events{/privacy}","received_events_url":"https://api.github.com/users/gkalpak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gkalpak/material","description":"Material design for Angular","fork":true,"url":"https://api.github.com/repos/gkalpak/material","forks_url":"https://api.github.com/repos/gkalpak/material/forks","keys_url":"https://api.github.com/repos/gkalpak/material/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gkalpak/material/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gkalpak/material/teams","hooks_url":"https://api.github.com/repos/gkalpak/material/hooks","issue_events_url":"https://api.github.com/repos/gkalpak/material/issues/events{/number}","events_url":"https://api.github.com/repos/gkalpak/material/events","assignees_url":"https://api.github.com/repos/gkalpak/material/assignees{/user}","branches_url":"https://api.github.com/repos/gkalpak/material/branches{/branch}","tags_url":"https://api.github.com/repos/gkalpak/material/tags","blobs_url":"https://api.github.com/repos/gkalpak/material/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gkalpak/material/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gkalpak/material/git/refs{/sha}","trees_url":"https://api.github.com/repos/gkalpak/material/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gkalpak/material/statuses/{sha}","languages_url":"https://api.github.com/repos/gkalpak/material/languages","stargazers_url":"https://api.github.com/repos/gkalpak/material/stargazers","contributors_url":"https://api.github.com/repos/gkalpak/material/contributors","subscribers_url":"https://api.github.com/repos/gkalpak/material/subscribers","subscription_url":"https://api.github.com/repos/gkalpak/material/subscription","commits_url":"https://api.github.com/repos/gkalpak/material/commits{/sha}","git_commits_url":"https://api.github.com/repos/gkalpak/material/git/commits{/sha}","comments_url":"https://api.github.com/repos/gkalpak/material/comments{/number}","issue_comment_url":"https://api.github.com/repos/gkalpak/material/issues/comments{/number}","contents_url":"https://api.github.com/repos/gkalpak/material/contents/{+path}","compare_url":"https://api.github.com/repos/gkalpak/material/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gkalpak/material/merges","archive_url":"https://api.github.com/repos/gkalpak/material/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gkalpak/material/downloads","issues_url":"https://api.github.com/repos/gkalpak/material/issues{/number}","pulls_url":"https://api.github.com/repos/gkalpak/material/pulls{/number}","milestones_url":"https://api.github.com/repos/gkalpak/material/milestones{/number}","notifications_url":"https://api.github.com/repos/gkalpak/material/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gkalpak/material/labels{/name}","releases_url":"https://api.github.com/repos/gkalpak/material/releases{/id}","deployments_url":"https://api.github.com/repos/gkalpak/material/deployments","created_at":"2014-11-25T22:19:29Z","updated_at":"2016-01-27T13:33:00Z","pushed_at":"2016-05-16T18:30:16Z","git_url":"git://github.com/gkalpak/material.git","ssh_url":"git@github.com:gkalpak/material.git","clone_url":"https://github.com/gkalpak/material.git","svn_url":"https://github.com/gkalpak/material","homepage":"https://material.angularjs.org/","size":42356,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"angular:master","ref":"master","sha":"3e452d224dc81ad00696dd6039369cf8169c167e","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":21399598,"name":"material","full_name":"angular/material","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/material","description":"Material design for Angular","fork":false,"url":"https://api.github.com/repos/angular/material","forks_url":"https://api.github.com/repos/angular/material/forks","keys_url":"https://api.github.com/repos/angular/material/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/material/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/material/teams","hooks_url":"https://api.github.com/repos/angular/material/hooks","issue_events_url":"https://api.github.com/repos/angular/material/issues/events{/number}","events_url":"https://api.github.com/repos/angular/material/events","assignees_url":"https://api.github.com/repos/angular/material/assignees{/user}","branches_url":"https://api.github.com/repos/angular/material/branches{/branch}","tags_url":"https://api.github.com/repos/angular/material/tags","blobs_url":"https://api.github.com/repos/angular/material/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/material/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/material/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/material/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/material/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/material/languages","stargazers_url":"https://api.github.com/repos/angular/material/stargazers","contributors_url":"https://api.github.com/repos/angular/material/contributors","subscribers_url":"https://api.github.com/repos/angular/material/subscribers","subscription_url":"https://api.github.com/repos/angular/material/subscription","commits_url":"https://api.github.com/repos/angular/material/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/material/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/material/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/material/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/material/contents/{+path}","compare_url":"https://api.github.com/repos/angular/material/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/material/merges","archive_url":"https://api.github.com/repos/angular/material/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/material/downloads","issues_url":"https://api.github.com/repos/angular/material/issues{/number}","pulls_url":"https://api.github.com/repos/angular/material/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/material/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/material/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/material/labels{/name}","releases_url":"https://api.github.com/repos/angular/material/releases{/id}","deployments_url":"https://api.github.com/repos/angular/material/deployments","created_at":"2014-07-01T19:20:06Z","updated_at":"2016-05-17T18:26:51Z","pushed_at":"2016-05-17T16:12:29Z","git_url":"git://github.com/angular/material.git","ssh_url":"git@github.com:angular/material.git","clone_url":"https://github.com/angular/material.git","svn_url":"https://github.com/angular/material","homepage":"https://material.angularjs.org/","size":80728,"stargazers_count":13535,"watchers_count":13535,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2765,"mirror_url":null,"open_issues_count":666,"forks":2765,"open_issues":666,"watchers":13535,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/material/pulls/8468"},"html":{"href":"https://github.com/angular/material/pull/8468"},"issue":{"href":"https://api.github.com/repos/angular/material/issues/8468"},"comments":{"href":"https://api.github.com/repos/angular/material/issues/8468/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/material/pulls/8468/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/material/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/material/pulls/8468/commits"},"statuses":{"href":"https://api.github.com/repos/angular/material/statuses/8354b3477cb8a1a0df7fe4b07b1dc35aaf3e9020"}}}}