{"action":"created","comment":{"url":"https://api.github.com/repos/incuna/angular-registration/pulls/comments/28403400","id":28403400,"diff_hunk":"@@ -56,7 +63,13 @@\n                             if (angular.isDefined(deferred)) {\n                                 deferred.notify('reject', response);\n                             }\n+                            apiError = true;\n                         });\n+                    } else {\n+                        //check there are no other error messages on the screen from the api\n+                        if (!apiError) {\n+                            scope.emptyEmail = true;\n+                        }","path":"registration/scripts/directives.js","position":42,"original_position":42,"commit_id":"74835a79ba8f9a8ff62019efa4bc1574c857c62c","original_commit_id":"74835a79ba8f9a8ff62019efa4bc1574c857c62c","user":{"login":"maxpeterson","id":473823,"avatar_url":"https://avatars.githubusercontent.com/u/473823?v=3","gravatar_id":"","url":"https://api.github.com/users/maxpeterson","html_url":"https://github.com/maxpeterson","followers_url":"https://api.github.com/users/maxpeterson/followers","following_url":"https://api.github.com/users/maxpeterson/following{/other_user}","gists_url":"https://api.github.com/users/maxpeterson/gists{/gist_id}","starred_url":"https://api.github.com/users/maxpeterson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxpeterson/subscriptions","organizations_url":"https://api.github.com/users/maxpeterson/orgs","repos_url":"https://api.github.com/users/maxpeterson/repos","events_url":"https://api.github.com/users/maxpeterson/events{/privacy}","received_events_url":"https://api.github.com/users/maxpeterson/received_events","type":"User","site_admin":false},"body":"I agree there should probably be an error from the api. That said, if we were to check for an empty email in the front-end then we should do it before sending the request to the api as there is no point in sending a request we know is not valid.","created_at":"2015-04-15T08:58:46Z","updated_at":"2015-04-15T08:58:46Z","html_url":"https://github.com/incuna/angular-registration/pull/15#discussion_r28403400","pull_request_url":"https://api.github.com/repos/incuna/angular-registration/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/incuna/angular-registration/pulls/comments/28403400"},"html":{"href":"https://github.com/incuna/angular-registration/pull/15#discussion_r28403400"},"pull_request":{"href":"https://api.github.com/repos/incuna/angular-registration/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/incuna/angular-registration/pulls/15","id":31814245,"html_url":"https://github.com/incuna/angular-registration/pull/15","diff_url":"https://github.com/incuna/angular-registration/pull/15.diff","patch_url":"https://github.com/incuna/angular-registration/pull/15.patch","issue_url":"https://api.github.com/repos/incuna/angular-registration/issues/15","number":15,"state":"open","locked":false,"title":"Change password","user":{"login":"Minglee01","id":10808373,"avatar_url":"https://avatars.githubusercontent.com/u/10808373?v=3","gravatar_id":"","url":"https://api.github.com/users/Minglee01","html_url":"https://github.com/Minglee01","followers_url":"https://api.github.com/users/Minglee01/followers","following_url":"https://api.github.com/users/Minglee01/following{/other_user}","gists_url":"https://api.github.com/users/Minglee01/gists{/gist_id}","starred_url":"https://api.github.com/users/Minglee01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Minglee01/subscriptions","organizations_url":"https://api.github.com/users/Minglee01/orgs","repos_url":"https://api.github.com/users/Minglee01/repos","events_url":"https://api.github.com/users/Minglee01/events{/privacy}","received_events_url":"https://api.github.com/users/Minglee01/received_events","type":"User","site_admin":false},"body":"@grahamgilchrist \r\nCheck that the email is not empty.","created_at":"2015-03-24T10:42:35Z","updated_at":"2015-04-15T08:58:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"619435fad9ca4afef293d058b5d38fdcd3bfb4d3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/incuna/angular-registration/pulls/15/commits","review_comments_url":"https://api.github.com/repos/incuna/angular-registration/pulls/15/comments","review_comment_url":"https://api.github.com/repos/incuna/angular-registration/pulls/comments{/number}","comments_url":"https://api.github.com/repos/incuna/angular-registration/issues/15/comments","statuses_url":"https://api.github.com/repos/incuna/angular-registration/statuses/74835a79ba8f9a8ff62019efa4bc1574c857c62c","head":{"label":"incuna:change-password","ref":"change-password","sha":"74835a79ba8f9a8ff62019efa4bc1574c857c62c","user":{"login":"incuna","id":55510,"avatar_url":"https://avatars.githubusercontent.com/u/55510?v=3","gravatar_id":"","url":"https://api.github.com/users/incuna","html_url":"https://github.com/incuna","followers_url":"https://api.github.com/users/incuna/followers","following_url":"https://api.github.com/users/incuna/following{/other_user}","gists_url":"https://api.github.com/users/incuna/gists{/gist_id}","starred_url":"https://api.github.com/users/incuna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incuna/subscriptions","organizations_url":"https://api.github.com/users/incuna/orgs","repos_url":"https://api.github.com/users/incuna/repos","events_url":"https://api.github.com/users/incuna/events{/privacy}","received_events_url":"https://api.github.com/users/incuna/received_events","type":"Organization","site_admin":false},"repo":{"id":16404831,"name":"angular-registration","full_name":"incuna/angular-registration","owner":{"login":"incuna","id":55510,"avatar_url":"https://avatars.githubusercontent.com/u/55510?v=3","gravatar_id":"","url":"https://api.github.com/users/incuna","html_url":"https://github.com/incuna","followers_url":"https://api.github.com/users/incuna/followers","following_url":"https://api.github.com/users/incuna/following{/other_user}","gists_url":"https://api.github.com/users/incuna/gists{/gist_id}","starred_url":"https://api.github.com/users/incuna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incuna/subscriptions","organizations_url":"https://api.github.com/users/incuna/orgs","repos_url":"https://api.github.com/users/incuna/repos","events_url":"https://api.github.com/users/incuna/events{/privacy}","received_events_url":"https://api.github.com/users/incuna/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/incuna/angular-registration","description":"","fork":false,"url":"https://api.github.com/repos/incuna/angular-registration","forks_url":"https://api.github.com/repos/incuna/angular-registration/forks","keys_url":"https://api.github.com/repos/incuna/angular-registration/keys{/key_id}","collaborators_url":"https://api.github.com/repos/incuna/angular-registration/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/incuna/angular-registration/teams","hooks_url":"https://api.github.com/repos/incuna/angular-registration/hooks","issue_events_url":"https://api.github.com/repos/incuna/angular-registration/issues/events{/number}","events_url":"https://api.github.com/repos/incuna/angular-registration/events","assignees_url":"https://api.github.com/repos/incuna/angular-registration/assignees{/user}","branches_url":"https://api.github.com/repos/incuna/angular-registration/branches{/branch}","tags_url":"https://api.github.com/repos/incuna/angular-registration/tags","blobs_url":"https://api.github.com/repos/incuna/angular-registration/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/incuna/angular-registration/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/incuna/angular-registration/git/refs{/sha}","trees_url":"https://api.github.com/repos/incuna/angular-registration/git/trees{/sha}","statuses_url":"https://api.github.com/repos/incuna/angular-registration/statuses/{sha}","languages_url":"https://api.github.com/repos/incuna/angular-registration/languages","stargazers_url":"https://api.github.com/repos/incuna/angular-registration/stargazers","contributors_url":"https://api.github.com/repos/incuna/angular-registration/contributors","subscribers_url":"https://api.github.com/repos/incuna/angular-registration/subscribers","subscription_url":"https://api.github.com/repos/incuna/angular-registration/subscription","commits_url":"https://api.github.com/repos/incuna/angular-registration/commits{/sha}","git_commits_url":"https://api.github.com/repos/incuna/angular-registration/git/commits{/sha}","comments_url":"https://api.github.com/repos/incuna/angular-registration/comments{/number}","issue_comment_url":"https://api.github.com/repos/incuna/angular-registration/issues/comments{/number}","contents_url":"https://api.github.com/repos/incuna/angular-registration/contents/{+path}","compare_url":"https://api.github.com/repos/incuna/angular-registration/compare/{base}...{head}","merges_url":"https://api.github.com/repos/incuna/angular-registration/merges","archive_url":"https://api.github.com/repos/incuna/angular-registration/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/incuna/angular-registration/downloads","issues_url":"https://api.github.com/repos/incuna/angular-registration/issues{/number}","pulls_url":"https://api.github.com/repos/incuna/angular-registration/pulls{/number}","milestones_url":"https://api.github.com/repos/incuna/angular-registration/milestones{/number}","notifications_url":"https://api.github.com/repos/incuna/angular-registration/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/incuna/angular-registration/labels{/name}","releases_url":"https://api.github.com/repos/incuna/angular-registration/releases{/id}","created_at":"2014-01-31T10:10:54Z","updated_at":"2015-03-20T15:21:29Z","pushed_at":"2015-03-24T10:42:35Z","git_url":"git://github.com/incuna/angular-registration.git","ssh_url":"git@github.com:incuna/angular-registration.git","clone_url":"https://github.com/incuna/angular-registration.git","svn_url":"https://github.com/incuna/angular-registration","homepage":null,"size":522,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"incuna:master","ref":"master","sha":"029fe0edff319a05f7bdeb0dc42fdb5fc1f98e5c","user":{"login":"incuna","id":55510,"avatar_url":"https://avatars.githubusercontent.com/u/55510?v=3","gravatar_id":"","url":"https://api.github.com/users/incuna","html_url":"https://github.com/incuna","followers_url":"https://api.github.com/users/incuna/followers","following_url":"https://api.github.com/users/incuna/following{/other_user}","gists_url":"https://api.github.com/users/incuna/gists{/gist_id}","starred_url":"https://api.github.com/users/incuna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incuna/subscriptions","organizations_url":"https://api.github.com/users/incuna/orgs","repos_url":"https://api.github.com/users/incuna/repos","events_url":"https://api.github.com/users/incuna/events{/privacy}","received_events_url":"https://api.github.com/users/incuna/received_events","type":"Organization","site_admin":false},"repo":{"id":16404831,"name":"angular-registration","full_name":"incuna/angular-registration","owner":{"login":"incuna","id":55510,"avatar_url":"https://avatars.githubusercontent.com/u/55510?v=3","gravatar_id":"","url":"https://api.github.com/users/incuna","html_url":"https://github.com/incuna","followers_url":"https://api.github.com/users/incuna/followers","following_url":"https://api.github.com/users/incuna/following{/other_user}","gists_url":"https://api.github.com/users/incuna/gists{/gist_id}","starred_url":"https://api.github.com/users/incuna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/incuna/subscriptions","organizations_url":"https://api.github.com/users/incuna/orgs","repos_url":"https://api.github.com/users/incuna/repos","events_url":"https://api.github.com/users/incuna/events{/privacy}","received_events_url":"https://api.github.com/users/incuna/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/incuna/angular-registration","description":"","fork":false,"url":"https://api.github.com/repos/incuna/angular-registration","forks_url":"https://api.github.com/repos/incuna/angular-registration/forks","keys_url":"https://api.github.com/repos/incuna/angular-registration/keys{/key_id}","collaborators_url":"https://api.github.com/repos/incuna/angular-registration/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/incuna/angular-registration/teams","hooks_url":"https://api.github.com/repos/incuna/angular-registration/hooks","issue_events_url":"https://api.github.com/repos/incuna/angular-registration/issues/events{/number}","events_url":"https://api.github.com/repos/incuna/angular-registration/events","assignees_url":"https://api.github.com/repos/incuna/angular-registration/assignees{/user}","branches_url":"https://api.github.com/repos/incuna/angular-registration/branches{/branch}","tags_url":"https://api.github.com/repos/incuna/angular-registration/tags","blobs_url":"https://api.github.com/repos/incuna/angular-registration/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/incuna/angular-registration/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/incuna/angular-registration/git/refs{/sha}","trees_url":"https://api.github.com/repos/incuna/angular-registration/git/trees{/sha}","statuses_url":"https://api.github.com/repos/incuna/angular-registration/statuses/{sha}","languages_url":"https://api.github.com/repos/incuna/angular-registration/languages","stargazers_url":"https://api.github.com/repos/incuna/angular-registration/stargazers","contributors_url":"https://api.github.com/repos/incuna/angular-registration/contributors","subscribers_url":"https://api.github.com/repos/incuna/angular-registration/subscribers","subscription_url":"https://api.github.com/repos/incuna/angular-registration/subscription","commits_url":"https://api.github.com/repos/incuna/angular-registration/commits{/sha}","git_commits_url":"https://api.github.com/repos/incuna/angular-registration/git/commits{/sha}","comments_url":"https://api.github.com/repos/incuna/angular-registration/comments{/number}","issue_comment_url":"https://api.github.com/repos/incuna/angular-registration/issues/comments{/number}","contents_url":"https://api.github.com/repos/incuna/angular-registration/contents/{+path}","compare_url":"https://api.github.com/repos/incuna/angular-registration/compare/{base}...{head}","merges_url":"https://api.github.com/repos/incuna/angular-registration/merges","archive_url":"https://api.github.com/repos/incuna/angular-registration/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/incuna/angular-registration/downloads","issues_url":"https://api.github.com/repos/incuna/angular-registration/issues{/number}","pulls_url":"https://api.github.com/repos/incuna/angular-registration/pulls{/number}","milestones_url":"https://api.github.com/repos/incuna/angular-registration/milestones{/number}","notifications_url":"https://api.github.com/repos/incuna/angular-registration/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/incuna/angular-registration/labels{/name}","releases_url":"https://api.github.com/repos/incuna/angular-registration/releases{/id}","created_at":"2014-01-31T10:10:54Z","updated_at":"2015-03-20T15:21:29Z","pushed_at":"2015-03-24T10:42:35Z","git_url":"git://github.com/incuna/angular-registration.git","ssh_url":"git@github.com:incuna/angular-registration.git","clone_url":"https://github.com/incuna/angular-registration.git","svn_url":"https://github.com/incuna/angular-registration","homepage":null,"size":522,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/incuna/angular-registration/pulls/15"},"html":{"href":"https://github.com/incuna/angular-registration/pull/15"},"issue":{"href":"https://api.github.com/repos/incuna/angular-registration/issues/15"},"comments":{"href":"https://api.github.com/repos/incuna/angular-registration/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/incuna/angular-registration/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/incuna/angular-registration/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/incuna/angular-registration/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/incuna/angular-registration/statuses/74835a79ba8f9a8ff62019efa4bc1574c857c62c"}}}}