{"action":"opened","number":524,"pull_request":{"url":"https://api.github.com/repos/DoSomething/voting-app/pulls/524","id":67906929,"html_url":"https://github.com/DoSomething/voting-app/pull/524","diff_url":"https://github.com/DoSomething/voting-app/pull/524.diff","patch_url":"https://github.com/DoSomething/voting-app/pull/524.patch","issue_url":"https://api.github.com/repos/DoSomething/voting-app/issues/524","number":524,"state":"open","locked":false,"title":"Catch Northstar errors.","user":{"login":"DFurnes","id":583202,"avatar_url":"https://avatars.githubusercontent.com/u/583202?v=3","gravatar_id":"","url":"https://api.github.com/users/DFurnes","html_url":"https://github.com/DFurnes","followers_url":"https://api.github.com/users/DFurnes/followers","following_url":"https://api.github.com/users/DFurnes/following{/other_user}","gists_url":"https://api.github.com/users/DFurnes/gists{/gist_id}","starred_url":"https://api.github.com/users/DFurnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DFurnes/subscriptions","organizations_url":"https://api.github.com/users/DFurnes/orgs","repos_url":"https://api.github.com/users/DFurnes/repos","events_url":"https://api.github.com/users/DFurnes/events{/privacy}","received_events_url":"https://api.github.com/users/DFurnes/received_events","type":"User","site_admin":false},"body":"#### Changes\r\nWhen sending users to Northstar, we may encounter errors. Instead of crashing and showing a \"Whoops!\", we should be prepared to handle each type of error:\r\n\r\nA validation may occur if we try to \"upsert\" a conflict, like if I registered with my real phone number and a `dfurnes+1234@dosomething.org` email, even though that phone number is already registered to a `dfurnes@dosomething.org` account.\r\n\r\nWe may get an `APIException` or a `ConnectionException` if another unexpected failure occurs. These are totally not good, but we should still record the vote and user in the local database, and trigger some monitoring alerts so we can fix it ASAP! 👷\r\n\r\n---\r\n🚧 ","created_at":"2016-04-26T15:29:27Z","updated_at":"2016-04-26T15:29:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DoSomething/voting-app/pulls/524/commits","review_comments_url":"https://api.github.com/repos/DoSomething/voting-app/pulls/524/comments","review_comment_url":"https://api.github.com/repos/DoSomething/voting-app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DoSomething/voting-app/issues/524/comments","statuses_url":"https://api.github.com/repos/DoSomething/voting-app/statuses/18f3bbb29621dce4a6e8afde506c594c4242cf08","head":{"label":"DFurnes:catch-ns-upsert-error","ref":"catch-ns-upsert-error","sha":"18f3bbb29621dce4a6e8afde506c594c4242cf08","user":{"login":"DFurnes","id":583202,"avatar_url":"https://avatars.githubusercontent.com/u/583202?v=3","gravatar_id":"","url":"https://api.github.com/users/DFurnes","html_url":"https://github.com/DFurnes","followers_url":"https://api.github.com/users/DFurnes/followers","following_url":"https://api.github.com/users/DFurnes/following{/other_user}","gists_url":"https://api.github.com/users/DFurnes/gists{/gist_id}","starred_url":"https://api.github.com/users/DFurnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DFurnes/subscriptions","organizations_url":"https://api.github.com/users/DFurnes/orgs","repos_url":"https://api.github.com/users/DFurnes/repos","events_url":"https://api.github.com/users/DFurnes/events{/privacy}","received_events_url":"https://api.github.com/users/DFurnes/received_events","type":"User","site_admin":false},"repo":{"id":34337731,"name":"voting-app","full_name":"DFurnes/voting-app","owner":{"login":"DFurnes","id":583202,"avatar_url":"https://avatars.githubusercontent.com/u/583202?v=3","gravatar_id":"","url":"https://api.github.com/users/DFurnes","html_url":"https://github.com/DFurnes","followers_url":"https://api.github.com/users/DFurnes/followers","following_url":"https://api.github.com/users/DFurnes/following{/other_user}","gists_url":"https://api.github.com/users/DFurnes/gists{/gist_id}","starred_url":"https://api.github.com/users/DFurnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DFurnes/subscriptions","organizations_url":"https://api.github.com/users/DFurnes/orgs","repos_url":"https://api.github.com/users/DFurnes/repos","events_url":"https://api.github.com/users/DFurnes/events{/privacy}","received_events_url":"https://api.github.com/users/DFurnes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DFurnes/voting-app","description":"Voting app for DoSomething.org campaigns.","fork":true,"url":"https://api.github.com/repos/DFurnes/voting-app","forks_url":"https://api.github.com/repos/DFurnes/voting-app/forks","keys_url":"https://api.github.com/repos/DFurnes/voting-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DFurnes/voting-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DFurnes/voting-app/teams","hooks_url":"https://api.github.com/repos/DFurnes/voting-app/hooks","issue_events_url":"https://api.github.com/repos/DFurnes/voting-app/issues/events{/number}","events_url":"https://api.github.com/repos/DFurnes/voting-app/events","assignees_url":"https://api.github.com/repos/DFurnes/voting-app/assignees{/user}","branches_url":"https://api.github.com/repos/DFurnes/voting-app/branches{/branch}","tags_url":"https://api.github.com/repos/DFurnes/voting-app/tags","blobs_url":"https://api.github.com/repos/DFurnes/voting-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DFurnes/voting-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DFurnes/voting-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/DFurnes/voting-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DFurnes/voting-app/statuses/{sha}","languages_url":"https://api.github.com/repos/DFurnes/voting-app/languages","stargazers_url":"https://api.github.com/repos/DFurnes/voting-app/stargazers","contributors_url":"https://api.github.com/repos/DFurnes/voting-app/contributors","subscribers_url":"https://api.github.com/repos/DFurnes/voting-app/subscribers","subscription_url":"https://api.github.com/repos/DFurnes/voting-app/subscription","commits_url":"https://api.github.com/repos/DFurnes/voting-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/DFurnes/voting-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/DFurnes/voting-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/DFurnes/voting-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/DFurnes/voting-app/contents/{+path}","compare_url":"https://api.github.com/repos/DFurnes/voting-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DFurnes/voting-app/merges","archive_url":"https://api.github.com/repos/DFurnes/voting-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DFurnes/voting-app/downloads","issues_url":"https://api.github.com/repos/DFurnes/voting-app/issues{/number}","pulls_url":"https://api.github.com/repos/DFurnes/voting-app/pulls{/number}","milestones_url":"https://api.github.com/repos/DFurnes/voting-app/milestones{/number}","notifications_url":"https://api.github.com/repos/DFurnes/voting-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DFurnes/voting-app/labels{/name}","releases_url":"https://api.github.com/repos/DFurnes/voting-app/releases{/id}","deployments_url":"https://api.github.com/repos/DFurnes/voting-app/deployments","created_at":"2015-04-21T16:07:23Z","updated_at":"2015-05-06T15:23:14Z","pushed_at":"2016-04-26T14:57:39Z","git_url":"git://github.com/DFurnes/voting-app.git","ssh_url":"git@github.com:DFurnes/voting-app.git","clone_url":"https://github.com/DFurnes/voting-app.git","svn_url":"https://github.com/DFurnes/voting-app","homepage":null,"size":2953,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"DoSomething:dev","ref":"dev","sha":"890151a27fa4b729ee8bb378ef7df8df07328a57","user":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"repo":{"id":24192462,"name":"voting-app","full_name":"DoSomething/voting-app","owner":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DoSomething/voting-app","description":"Voting app for DoSomething.org campaigns.","fork":false,"url":"https://api.github.com/repos/DoSomething/voting-app","forks_url":"https://api.github.com/repos/DoSomething/voting-app/forks","keys_url":"https://api.github.com/repos/DoSomething/voting-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoSomething/voting-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoSomething/voting-app/teams","hooks_url":"https://api.github.com/repos/DoSomething/voting-app/hooks","issue_events_url":"https://api.github.com/repos/DoSomething/voting-app/issues/events{/number}","events_url":"https://api.github.com/repos/DoSomething/voting-app/events","assignees_url":"https://api.github.com/repos/DoSomething/voting-app/assignees{/user}","branches_url":"https://api.github.com/repos/DoSomething/voting-app/branches{/branch}","tags_url":"https://api.github.com/repos/DoSomething/voting-app/tags","blobs_url":"https://api.github.com/repos/DoSomething/voting-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoSomething/voting-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoSomething/voting-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoSomething/voting-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoSomething/voting-app/statuses/{sha}","languages_url":"https://api.github.com/repos/DoSomething/voting-app/languages","stargazers_url":"https://api.github.com/repos/DoSomething/voting-app/stargazers","contributors_url":"https://api.github.com/repos/DoSomething/voting-app/contributors","subscribers_url":"https://api.github.com/repos/DoSomething/voting-app/subscribers","subscription_url":"https://api.github.com/repos/DoSomething/voting-app/subscription","commits_url":"https://api.github.com/repos/DoSomething/voting-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoSomething/voting-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoSomething/voting-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoSomething/voting-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoSomething/voting-app/contents/{+path}","compare_url":"https://api.github.com/repos/DoSomething/voting-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoSomething/voting-app/merges","archive_url":"https://api.github.com/repos/DoSomething/voting-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoSomething/voting-app/downloads","issues_url":"https://api.github.com/repos/DoSomething/voting-app/issues{/number}","pulls_url":"https://api.github.com/repos/DoSomething/voting-app/pulls{/number}","milestones_url":"https://api.github.com/repos/DoSomething/voting-app/milestones{/number}","notifications_url":"https://api.github.com/repos/DoSomething/voting-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoSomething/voting-app/labels{/name}","releases_url":"https://api.github.com/repos/DoSomething/voting-app/releases{/id}","deployments_url":"https://api.github.com/repos/DoSomething/voting-app/deployments","created_at":"2014-09-18T14:58:47Z","updated_at":"2016-04-01T08:44:01Z","pushed_at":"2016-04-18T18:40:57Z","git_url":"git://github.com/DoSomething/voting-app.git","ssh_url":"git@github.com:DoSomething/voting-app.git","clone_url":"https://github.com/DoSomething/voting-app.git","svn_url":"https://github.com/DoSomething/voting-app","homepage":null,"size":2868,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":12,"forks":6,"open_issues":12,"watchers":3,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/DoSomething/voting-app/pulls/524"},"html":{"href":"https://github.com/DoSomething/voting-app/pull/524"},"issue":{"href":"https://api.github.com/repos/DoSomething/voting-app/issues/524"},"comments":{"href":"https://api.github.com/repos/DoSomething/voting-app/issues/524/comments"},"review_comments":{"href":"https://api.github.com/repos/DoSomething/voting-app/pulls/524/comments"},"review_comment":{"href":"https://api.github.com/repos/DoSomething/voting-app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DoSomething/voting-app/pulls/524/commits"},"statuses":{"href":"https://api.github.com/repos/DoSomething/voting-app/statuses/18f3bbb29621dce4a6e8afde506c594c4242cf08"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":52,"deletions":43,"changed_files":2}}