{"action":"created","comment":{"url":"https://api.github.com/repos/findOctave/cortex/pulls/comments/236456996","pull_request_review_id":178536990,"id":236456996,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNjQ1Njk5Ng==","diff_hunk":"@@ -76,26 +76,21 @@ const validateCouponForm = async (props, userInputs) => {\n const validateCreditCardForm = async props => {\n   if (!props.lead && !props.lead.id) return { isValid: false }\n   let newState = {}\n-  const stripeData = await createStripeToken({})\n-  if (!stripeData.error) {\n-    try {\n-      await gql.request(\n-        `\n-          mutation {\n-            createClientFromLead(\n-              leadId: \"${props.lead.id}\"\n-              stripeSource: \"${stripeData.token.id}\"\n-            ) {\n-              name\n-            }\n+  const { token, error } = await createStripeToken({})\n+  if (error) throw error\n+  await gql.request(\n+    `\n+        mutation {\n+          createClientFromLead(\n+            leadId: \"${props.lead.id}\"\n+            stripeSource: \"${token.id}\"\n+          ) {\n+            name\n           }\n-        `\n-      )\n-      newState.isValidCard = true\n-    } catch (err) {\n-      throw new Error(err)","path":"apps/portal/components/schedule/customer-form/index.js","position":31,"original_position":31,"commit_id":"bd9dfc883ec8eec84faa588728301dd40ff0e475","original_commit_id":"bd9dfc883ec8eec84faa588728301dd40ff0e475","user":{"login":"craigspaeth","id":555859,"node_id":"MDQ6VXNlcjU1NTg1OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/555859?v=4","gravatar_id":"","url":"https://api.github.com/users/craigspaeth","html_url":"https://github.com/craigspaeth","followers_url":"https://api.github.com/users/craigspaeth/followers","following_url":"https://api.github.com/users/craigspaeth/following{/other_user}","gists_url":"https://api.github.com/users/craigspaeth/gists{/gist_id}","starred_url":"https://api.github.com/users/craigspaeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigspaeth/subscriptions","organizations_url":"https://api.github.com/users/craigspaeth/orgs","repos_url":"https://api.github.com/users/craigspaeth/repos","events_url":"https://api.github.com/users/craigspaeth/events{/privacy}","received_events_url":"https://api.github.com/users/craigspaeth/received_events","type":"User","site_admin":false},"body":"Try to avoid `catching` where you don't need to. This line, for instance, is doing the exact same thing as if you didn't wrap it in a `try/catch` in the first place. I noticed in the lead-form you're [catching the error and returning it instead](https://github.com/findOctave/cortex/blob/master/apps/portal/components/schedule/lead-form/index.js#L52) too. This ends up swallowing the error and causes hard to trace bugs (e.g. if someone enters an invalid phone number it just silently fails).","created_at":"2018-11-26T22:43:34Z","updated_at":"2018-11-26T22:43:34Z","html_url":"https://github.com/findOctave/cortex/pull/347#discussion_r236456996","pull_request_url":"https://api.github.com/repos/findOctave/cortex/pulls/347","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/findOctave/cortex/pulls/comments/236456996"},"html":{"href":"https://github.com/findOctave/cortex/pull/347#discussion_r236456996"},"pull_request":{"href":"https://api.github.com/repos/findOctave/cortex/pulls/347"}}},"pull_request":{"url":"https://api.github.com/repos/findOctave/cortex/pulls/347","id":233717531,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzNzE3NTMx","html_url":"https://github.com/findOctave/cortex/pull/347","diff_url":"https://github.com/findOctave/cortex/pull/347.diff","patch_url":"https://github.com/findOctave/cortex/pull/347.patch","issue_url":"https://api.github.com/repos/findOctave/cortex/issues/347","number":347,"state":"open","locked":false,"title":"Add UX elements to new scheduling flow","user":{"login":"craigspaeth","id":555859,"node_id":"MDQ6VXNlcjU1NTg1OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/555859?v=4","gravatar_id":"","url":"https://api.github.com/users/craigspaeth","html_url":"https://github.com/craigspaeth","followers_url":"https://api.github.com/users/craigspaeth/followers","following_url":"https://api.github.com/users/craigspaeth/following{/other_user}","gists_url":"https://api.github.com/users/craigspaeth/gists{/gist_id}","starred_url":"https://api.github.com/users/craigspaeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigspaeth/subscriptions","organizations_url":"https://api.github.com/users/craigspaeth/orgs","repos_url":"https://api.github.com/users/craigspaeth/repos","events_url":"https://api.github.com/users/craigspaeth/events{/privacy}","received_events_url":"https://api.github.com/users/craigspaeth/received_events","type":"User","site_admin":false},"body":"This puts things back in like disabling the next button, surfacing validation errors, and some new things like highlighting the clickable dates in the calendar.\r\n\r\n![cap](https://user-images.githubusercontent.com/555859/49045917-6ff21e80-f1a0-11e8-8312-c69142020c4b.gif)\r\n","created_at":"2018-11-26T22:27:20Z","updated_at":"2018-11-26T22:43:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"611ba4838a95a0147f7e1296d7554c40749b6c6d","assignee":null,"assignees":[],"requested_reviewers":[{"login":"lionsdwarf","id":10677428,"node_id":"MDQ6VXNlcjEwNjc3NDI4","avatar_url":"https://avatars1.githubusercontent.com/u/10677428?v=4","gravatar_id":"","url":"https://api.github.com/users/lionsdwarf","html_url":"https://github.com/lionsdwarf","followers_url":"https://api.github.com/users/lionsdwarf/followers","following_url":"https://api.github.com/users/lionsdwarf/following{/other_user}","gists_url":"https://api.github.com/users/lionsdwarf/gists{/gist_id}","starred_url":"https://api.github.com/users/lionsdwarf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lionsdwarf/subscriptions","organizations_url":"https://api.github.com/users/lionsdwarf/orgs","repos_url":"https://api.github.com/users/lionsdwarf/repos","events_url":"https://api.github.com/users/lionsdwarf/events{/privacy}","received_events_url":"https://api.github.com/users/lionsdwarf/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/findOctave/cortex/pulls/347/commits","review_comments_url":"https://api.github.com/repos/findOctave/cortex/pulls/347/comments","review_comment_url":"https://api.github.com/repos/findOctave/cortex/pulls/comments{/number}","comments_url":"https://api.github.com/repos/findOctave/cortex/issues/347/comments","statuses_url":"https://api.github.com/repos/findOctave/cortex/statuses/bd9dfc883ec8eec84faa588728301dd40ff0e475","head":{"label":"craigspaeth:scheduler","ref":"scheduler","sha":"bd9dfc883ec8eec84faa588728301dd40ff0e475","user":{"login":"craigspaeth","id":555859,"node_id":"MDQ6VXNlcjU1NTg1OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/555859?v=4","gravatar_id":"","url":"https://api.github.com/users/craigspaeth","html_url":"https://github.com/craigspaeth","followers_url":"https://api.github.com/users/craigspaeth/followers","following_url":"https://api.github.com/users/craigspaeth/following{/other_user}","gists_url":"https://api.github.com/users/craigspaeth/gists{/gist_id}","starred_url":"https://api.github.com/users/craigspaeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigspaeth/subscriptions","organizations_url":"https://api.github.com/users/craigspaeth/orgs","repos_url":"https://api.github.com/users/craigspaeth/repos","events_url":"https://api.github.com/users/craigspaeth/events{/privacy}","received_events_url":"https://api.github.com/users/craigspaeth/received_events","type":"User","site_admin":false},"repo":{"id":136385310,"node_id":"MDEwOlJlcG9zaXRvcnkxMzYzODUzMTA=","name":"cortex","full_name":"craigspaeth/cortex","private":false,"owner":{"login":"craigspaeth","id":555859,"node_id":"MDQ6VXNlcjU1NTg1OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/555859?v=4","gravatar_id":"","url":"https://api.github.com/users/craigspaeth","html_url":"https://github.com/craigspaeth","followers_url":"https://api.github.com/users/craigspaeth/followers","following_url":"https://api.github.com/users/craigspaeth/following{/other_user}","gists_url":"https://api.github.com/users/craigspaeth/gists{/gist_id}","starred_url":"https://api.github.com/users/craigspaeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigspaeth/subscriptions","organizations_url":"https://api.github.com/users/craigspaeth/orgs","repos_url":"https://api.github.com/users/craigspaeth/repos","events_url":"https://api.github.com/users/craigspaeth/events{/privacy}","received_events_url":"https://api.github.com/users/craigspaeth/received_events","type":"User","site_admin":false},"html_url":"https://github.com/craigspaeth/cortex","description":"The beginning of something great","fork":true,"url":"https://api.github.com/repos/craigspaeth/cortex","forks_url":"https://api.github.com/repos/craigspaeth/cortex/forks","keys_url":"https://api.github.com/repos/craigspaeth/cortex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/craigspaeth/cortex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/craigspaeth/cortex/teams","hooks_url":"https://api.github.com/repos/craigspaeth/cortex/hooks","issue_events_url":"https://api.github.com/repos/craigspaeth/cortex/issues/events{/number}","events_url":"https://api.github.com/repos/craigspaeth/cortex/events","assignees_url":"https://api.github.com/repos/craigspaeth/cortex/assignees{/user}","branches_url":"https://api.github.com/repos/craigspaeth/cortex/branches{/branch}","tags_url":"https://api.github.com/repos/craigspaeth/cortex/tags","blobs_url":"https://api.github.com/repos/craigspaeth/cortex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/craigspaeth/cortex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/craigspaeth/cortex/git/refs{/sha}","trees_url":"https://api.github.com/repos/craigspaeth/cortex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/craigspaeth/cortex/statuses/{sha}","languages_url":"https://api.github.com/repos/craigspaeth/cortex/languages","stargazers_url":"https://api.github.com/repos/craigspaeth/cortex/stargazers","contributors_url":"https://api.github.com/repos/craigspaeth/cortex/contributors","subscribers_url":"https://api.github.com/repos/craigspaeth/cortex/subscribers","subscription_url":"https://api.github.com/repos/craigspaeth/cortex/subscription","commits_url":"https://api.github.com/repos/craigspaeth/cortex/commits{/sha}","git_commits_url":"https://api.github.com/repos/craigspaeth/cortex/git/commits{/sha}","comments_url":"https://api.github.com/repos/craigspaeth/cortex/comments{/number}","issue_comment_url":"https://api.github.com/repos/craigspaeth/cortex/issues/comments{/number}","contents_url":"https://api.github.com/repos/craigspaeth/cortex/contents/{+path}","compare_url":"https://api.github.com/repos/craigspaeth/cortex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/craigspaeth/cortex/merges","archive_url":"https://api.github.com/repos/craigspaeth/cortex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/craigspaeth/cortex/downloads","issues_url":"https://api.github.com/repos/craigspaeth/cortex/issues{/number}","pulls_url":"https://api.github.com/repos/craigspaeth/cortex/pulls{/number}","milestones_url":"https://api.github.com/repos/craigspaeth/cortex/milestones{/number}","notifications_url":"https://api.github.com/repos/craigspaeth/cortex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/craigspaeth/cortex/labels{/name}","releases_url":"https://api.github.com/repos/craigspaeth/cortex/releases{/id}","deployments_url":"https://api.github.com/repos/craigspaeth/cortex/deployments","created_at":"2018-06-06T20:57:53Z","updated_at":"2018-11-26T19:32:20Z","pushed_at":"2018-11-26T22:26:15Z","git_url":"git://github.com/craigspaeth/cortex.git","ssh_url":"git@github.com:craigspaeth/cortex.git","clone_url":"https://github.com/craigspaeth/cortex.git","svn_url":"https://github.com/craigspaeth/cortex","homepage":null,"size":5763,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"findOctave:master","ref":"master","sha":"8ff93910758476292d8b36e10aef23d5f948c91c","user":{"login":"findOctave","id":40005440,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwMDA1NDQw","avatar_url":"https://avatars2.githubusercontent.com/u/40005440?v=4","gravatar_id":"","url":"https://api.github.com/users/findOctave","html_url":"https://github.com/findOctave","followers_url":"https://api.github.com/users/findOctave/followers","following_url":"https://api.github.com/users/findOctave/following{/other_user}","gists_url":"https://api.github.com/users/findOctave/gists{/gist_id}","starred_url":"https://api.github.com/users/findOctave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/findOctave/subscriptions","organizations_url":"https://api.github.com/users/findOctave/orgs","repos_url":"https://api.github.com/users/findOctave/repos","events_url":"https://api.github.com/users/findOctave/events{/privacy}","received_events_url":"https://api.github.com/users/findOctave/received_events","type":"Organization","site_admin":false},"repo":{"id":136378049,"node_id":"MDEwOlJlcG9zaXRvcnkxMzYzNzgwNDk=","name":"cortex","full_name":"findOctave/cortex","private":false,"owner":{"login":"findOctave","id":40005440,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwMDA1NDQw","avatar_url":"https://avatars2.githubusercontent.com/u/40005440?v=4","gravatar_id":"","url":"https://api.github.com/users/findOctave","html_url":"https://github.com/findOctave","followers_url":"https://api.github.com/users/findOctave/followers","following_url":"https://api.github.com/users/findOctave/following{/other_user}","gists_url":"https://api.github.com/users/findOctave/gists{/gist_id}","starred_url":"https://api.github.com/users/findOctave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/findOctave/subscriptions","organizations_url":"https://api.github.com/users/findOctave/orgs","repos_url":"https://api.github.com/users/findOctave/repos","events_url":"https://api.github.com/users/findOctave/events{/privacy}","received_events_url":"https://api.github.com/users/findOctave/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/findOctave/cortex","description":"The main Octave repo","fork":false,"url":"https://api.github.com/repos/findOctave/cortex","forks_url":"https://api.github.com/repos/findOctave/cortex/forks","keys_url":"https://api.github.com/repos/findOctave/cortex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/findOctave/cortex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/findOctave/cortex/teams","hooks_url":"https://api.github.com/repos/findOctave/cortex/hooks","issue_events_url":"https://api.github.com/repos/findOctave/cortex/issues/events{/number}","events_url":"https://api.github.com/repos/findOctave/cortex/events","assignees_url":"https://api.github.com/repos/findOctave/cortex/assignees{/user}","branches_url":"https://api.github.com/repos/findOctave/cortex/branches{/branch}","tags_url":"https://api.github.com/repos/findOctave/cortex/tags","blobs_url":"https://api.github.com/repos/findOctave/cortex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/findOctave/cortex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/findOctave/cortex/git/refs{/sha}","trees_url":"https://api.github.com/repos/findOctave/cortex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/findOctave/cortex/statuses/{sha}","languages_url":"https://api.github.com/repos/findOctave/cortex/languages","stargazers_url":"https://api.github.com/repos/findOctave/cortex/stargazers","contributors_url":"https://api.github.com/repos/findOctave/cortex/contributors","subscribers_url":"https://api.github.com/repos/findOctave/cortex/subscribers","subscription_url":"https://api.github.com/repos/findOctave/cortex/subscription","commits_url":"https://api.github.com/repos/findOctave/cortex/commits{/sha}","git_commits_url":"https://api.github.com/repos/findOctave/cortex/git/commits{/sha}","comments_url":"https://api.github.com/repos/findOctave/cortex/comments{/number}","issue_comment_url":"https://api.github.com/repos/findOctave/cortex/issues/comments{/number}","contents_url":"https://api.github.com/repos/findOctave/cortex/contents/{+path}","compare_url":"https://api.github.com/repos/findOctave/cortex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/findOctave/cortex/merges","archive_url":"https://api.github.com/repos/findOctave/cortex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/findOctave/cortex/downloads","issues_url":"https://api.github.com/repos/findOctave/cortex/issues{/number}","pulls_url":"https://api.github.com/repos/findOctave/cortex/pulls{/number}","milestones_url":"https://api.github.com/repos/findOctave/cortex/milestones{/number}","notifications_url":"https://api.github.com/repos/findOctave/cortex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/findOctave/cortex/labels{/name}","releases_url":"https://api.github.com/repos/findOctave/cortex/releases{/id}","deployments_url":"https://api.github.com/repos/findOctave/cortex/deployments","created_at":"2018-06-06T19:40:44Z","updated_at":"2018-11-26T19:12:08Z","pushed_at":"2018-11-26T22:27:21Z","git_url":"git://github.com/findOctave/cortex.git","ssh_url":"git@github.com:findOctave/cortex.git","clone_url":"https://github.com/findOctave/cortex.git","svn_url":"https://github.com/findOctave/cortex","homepage":"https://octave-cortex-staging.herokuapp.com/","size":5737,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":5,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/findOctave/cortex/pulls/347"},"html":{"href":"https://github.com/findOctave/cortex/pull/347"},"issue":{"href":"https://api.github.com/repos/findOctave/cortex/issues/347"},"comments":{"href":"https://api.github.com/repos/findOctave/cortex/issues/347/comments"},"review_comments":{"href":"https://api.github.com/repos/findOctave/cortex/pulls/347/comments"},"review_comment":{"href":"https://api.github.com/repos/findOctave/cortex/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/findOctave/cortex/pulls/347/commits"},"statuses":{"href":"https://api.github.com/repos/findOctave/cortex/statuses/bd9dfc883ec8eec84faa588728301dd40ff0e475"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"craigspaeth"}}