{"action":"created","comment":{"url":"https://api.github.com/repos/usds/us-forms-system/pulls/comments/206280034","pull_request_review_id":141665463,"id":206280034,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjI4MDAzNA==","diff_hunk":"@@ -170,14 +160,8 @@ export function submitForm(formConfig, form) {\n         // overly cautious\n         const error = errorReceived instanceof Error ? errorReceived : new Error(errorReceived);\n         const errorMessage = String(error.message);\n-        let errorType = 'clientError';\n-        if (errorMessage.startsWith('vets_throttled_error')) {\n-          errorType = 'throttledError';\n-        } else if (errorMessage.startsWith('vets_server_error')) {\n-          errorType = 'serverError';\n-        }\n-        captureError(error, errorType);\n-        dispatch(setSubmission('status', errorType, error.extra));\n+        telemetry('error', error);","path":"src/js/actions.js","position":80,"original_position":80,"commit_id":"63d3ff071675a67021895ec80e28d214e7a8fbd4","original_commit_id":"63d3ff071675a67021895ec80e28d214e7a8fbd4","user":{"login":"dmethvin-gov","id":40182224,"node_id":"MDQ6VXNlcjQwMTgyMjI0","avatar_url":"https://avatars2.githubusercontent.com/u/40182224?v=4","gravatar_id":"","url":"https://api.github.com/users/dmethvin-gov","html_url":"https://github.com/dmethvin-gov","followers_url":"https://api.github.com/users/dmethvin-gov/followers","following_url":"https://api.github.com/users/dmethvin-gov/following{/other_user}","gists_url":"https://api.github.com/users/dmethvin-gov/gists{/gist_id}","starred_url":"https://api.github.com/users/dmethvin-gov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmethvin-gov/subscriptions","organizations_url":"https://api.github.com/users/dmethvin-gov/orgs","repos_url":"https://api.github.com/users/dmethvin-gov/repos","events_url":"https://api.github.com/users/dmethvin-gov/events{/privacy}","received_events_url":"https://api.github.com/users/dmethvin-gov/received_events","type":"User","site_admin":false},"body":"These are obviously errors specific to vets.gov, so I pulled this out. If vets.gov needs site-specific messages they could be sent by the hook function. (Essentially, move the deleted code to the hook function I think,)","created_at":"2018-07-30T18:43:17Z","updated_at":"2018-07-30T18:43:17Z","html_url":"https://github.com/usds/us-forms-system/pull/196#discussion_r206280034","pull_request_url":"https://api.github.com/repos/usds/us-forms-system/pulls/196","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/usds/us-forms-system/pulls/comments/206280034"},"html":{"href":"https://github.com/usds/us-forms-system/pull/196#discussion_r206280034"},"pull_request":{"href":"https://api.github.com/repos/usds/us-forms-system/pulls/196"}}},"pull_request":{"url":"https://api.github.com/repos/usds/us-forms-system/pulls/196","id":204892664,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0ODkyNjY0","html_url":"https://github.com/usds/us-forms-system/pull/196","diff_url":"https://github.com/usds/us-forms-system/pull/196.diff","patch_url":"https://github.com/usds/us-forms-system/pull/196.patch","issue_url":"https://api.github.com/repos/usds/us-forms-system/issues/196","number":196,"state":"open","locked":false,"title":"[WIP] Move Google Analytics and Sentry to hooks that apps can call","user":{"login":"dmethvin-gov","id":40182224,"node_id":"MDQ6VXNlcjQwMTgyMjI0","avatar_url":"https://avatars2.githubusercontent.com/u/40182224?v=4","gravatar_id":"","url":"https://api.github.com/users/dmethvin-gov","html_url":"https://github.com/dmethvin-gov","followers_url":"https://api.github.com/users/dmethvin-gov/followers","following_url":"https://api.github.com/users/dmethvin-gov/following{/other_user}","gists_url":"https://api.github.com/users/dmethvin-gov/gists{/gist_id}","starred_url":"https://api.github.com/users/dmethvin-gov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmethvin-gov/subscriptions","organizations_url":"https://api.github.com/users/dmethvin-gov/orgs","repos_url":"https://api.github.com/users/dmethvin-gov/repos","events_url":"https://api.github.com/users/dmethvin-gov/events{/privacy}","received_events_url":"https://api.github.com/users/dmethvin-gov/received_events","type":"User","site_admin":false},"body":"Fixes #134\r\n\r\nPutting this up for discussion now since there are some thorny questions about back-compat with the existing vets.gov--see comments. \r\n\r\nThe basic idea is to move the GA and error reporting to the app rather than embed it in the library. This gives the app writer the opportunity to decide what should be reported and which one of the dozens of event reporter services they should use. I've put the hook in `formConfig.clientTelemetry` but better names are welcome. The hook function does not need to be passed the `formConfig` because the app writer's hook function can always get it directly from their own project or use `formConfig.clientTelemetry.bind(formConfig)` if they prefer.\r\n\r\nOnce design issues are resolved this PR still needs:\r\n- [ ] Docs on the feature as finally implemented\r\n- [ ] Unit tests\r\n\r\nAnd separately in `us-forms-system-starter-app`\r\n- [ ] Skeletal implementation, using `console.error` or similar perhaps?","created_at":"2018-07-30T18:36:05Z","updated_at":"2018-07-30T18:43:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"44027659c6457fa119723f3568aefa805cb2c285","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/usds/us-forms-system/pulls/196/commits","review_comments_url":"https://api.github.com/repos/usds/us-forms-system/pulls/196/comments","review_comment_url":"https://api.github.com/repos/usds/us-forms-system/pulls/comments{/number}","comments_url":"https://api.github.com/repos/usds/us-forms-system/issues/196/comments","statuses_url":"https://api.github.com/repos/usds/us-forms-system/statuses/63d3ff071675a67021895ec80e28d214e7a8fbd4","head":{"label":"dmethvin-gov:134-tracking","ref":"134-tracking","sha":"63d3ff071675a67021895ec80e28d214e7a8fbd4","user":{"login":"dmethvin-gov","id":40182224,"node_id":"MDQ6VXNlcjQwMTgyMjI0","avatar_url":"https://avatars2.githubusercontent.com/u/40182224?v=4","gravatar_id":"","url":"https://api.github.com/users/dmethvin-gov","html_url":"https://github.com/dmethvin-gov","followers_url":"https://api.github.com/users/dmethvin-gov/followers","following_url":"https://api.github.com/users/dmethvin-gov/following{/other_user}","gists_url":"https://api.github.com/users/dmethvin-gov/gists{/gist_id}","starred_url":"https://api.github.com/users/dmethvin-gov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmethvin-gov/subscriptions","organizations_url":"https://api.github.com/users/dmethvin-gov/orgs","repos_url":"https://api.github.com/users/dmethvin-gov/repos","events_url":"https://api.github.com/users/dmethvin-gov/events{/privacy}","received_events_url":"https://api.github.com/users/dmethvin-gov/received_events","type":"User","site_admin":false},"repo":{"id":137513119,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc1MTMxMTk=","name":"us-forms-system","full_name":"dmethvin-gov/us-forms-system","owner":{"login":"dmethvin-gov","id":40182224,"node_id":"MDQ6VXNlcjQwMTgyMjI0","avatar_url":"https://avatars2.githubusercontent.com/u/40182224?v=4","gravatar_id":"","url":"https://api.github.com/users/dmethvin-gov","html_url":"https://github.com/dmethvin-gov","followers_url":"https://api.github.com/users/dmethvin-gov/followers","following_url":"https://api.github.com/users/dmethvin-gov/following{/other_user}","gists_url":"https://api.github.com/users/dmethvin-gov/gists{/gist_id}","starred_url":"https://api.github.com/users/dmethvin-gov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmethvin-gov/subscriptions","organizations_url":"https://api.github.com/users/dmethvin-gov/orgs","repos_url":"https://api.github.com/users/dmethvin-gov/repos","events_url":"https://api.github.com/users/dmethvin-gov/events{/privacy}","received_events_url":"https://api.github.com/users/dmethvin-gov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dmethvin-gov/us-forms-system","description":"Build React forms with JSON Schema and the U.S. Web Design System","fork":true,"url":"https://api.github.com/repos/dmethvin-gov/us-forms-system","forks_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/forks","keys_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/teams","hooks_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/hooks","issue_events_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/issues/events{/number}","events_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/events","assignees_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/assignees{/user}","branches_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/branches{/branch}","tags_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/tags","blobs_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/git/refs{/sha}","trees_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/statuses/{sha}","languages_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/languages","stargazers_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/stargazers","contributors_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/contributors","subscribers_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/subscribers","subscription_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/subscription","commits_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/commits{/sha}","git_commits_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/git/commits{/sha}","comments_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/comments{/number}","issue_comment_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/issues/comments{/number}","contents_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/contents/{+path}","compare_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/merges","archive_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/downloads","issues_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/issues{/number}","pulls_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/pulls{/number}","milestones_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/milestones{/number}","notifications_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/labels{/name}","releases_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/releases{/id}","deployments_url":"https://api.github.com/repos/dmethvin-gov/us-forms-system/deployments","created_at":"2018-06-15T17:06:09Z","updated_at":"2018-07-30T14:21:04Z","pushed_at":"2018-07-30T18:27:17Z","git_url":"git://github.com/dmethvin-gov/us-forms-system.git","ssh_url":"git@github.com:dmethvin-gov/us-forms-system.git","clone_url":"https://github.com/dmethvin-gov/us-forms-system.git","svn_url":"https://github.com/dmethvin-gov/us-forms-system","homepage":null,"size":2990,"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":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"usds:master","ref":"master","sha":"3261c6a32a802856341a5eddf006429fa1457f86","user":{"login":"usds","id":8751968,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg3NTE5Njg=","avatar_url":"https://avatars1.githubusercontent.com/u/8751968?v=4","gravatar_id":"","url":"https://api.github.com/users/usds","html_url":"https://github.com/usds","followers_url":"https://api.github.com/users/usds/followers","following_url":"https://api.github.com/users/usds/following{/other_user}","gists_url":"https://api.github.com/users/usds/gists{/gist_id}","starred_url":"https://api.github.com/users/usds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/usds/subscriptions","organizations_url":"https://api.github.com/users/usds/orgs","repos_url":"https://api.github.com/users/usds/repos","events_url":"https://api.github.com/users/usds/events{/privacy}","received_events_url":"https://api.github.com/users/usds/received_events","type":"Organization","site_admin":false},"repo":{"id":129421356,"node_id":"MDEwOlJlcG9zaXRvcnkxMjk0MjEzNTY=","name":"us-forms-system","full_name":"usds/us-forms-system","owner":{"login":"usds","id":8751968,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg3NTE5Njg=","avatar_url":"https://avatars1.githubusercontent.com/u/8751968?v=4","gravatar_id":"","url":"https://api.github.com/users/usds","html_url":"https://github.com/usds","followers_url":"https://api.github.com/users/usds/followers","following_url":"https://api.github.com/users/usds/following{/other_user}","gists_url":"https://api.github.com/users/usds/gists{/gist_id}","starred_url":"https://api.github.com/users/usds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/usds/subscriptions","organizations_url":"https://api.github.com/users/usds/orgs","repos_url":"https://api.github.com/users/usds/repos","events_url":"https://api.github.com/users/usds/events{/privacy}","received_events_url":"https://api.github.com/users/usds/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/usds/us-forms-system","description":"Build React forms with JSON Schema and the U.S. Web Design System","fork":false,"url":"https://api.github.com/repos/usds/us-forms-system","forks_url":"https://api.github.com/repos/usds/us-forms-system/forks","keys_url":"https://api.github.com/repos/usds/us-forms-system/keys{/key_id}","collaborators_url":"https://api.github.com/repos/usds/us-forms-system/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/usds/us-forms-system/teams","hooks_url":"https://api.github.com/repos/usds/us-forms-system/hooks","issue_events_url":"https://api.github.com/repos/usds/us-forms-system/issues/events{/number}","events_url":"https://api.github.com/repos/usds/us-forms-system/events","assignees_url":"https://api.github.com/repos/usds/us-forms-system/assignees{/user}","branches_url":"https://api.github.com/repos/usds/us-forms-system/branches{/branch}","tags_url":"https://api.github.com/repos/usds/us-forms-system/tags","blobs_url":"https://api.github.com/repos/usds/us-forms-system/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/usds/us-forms-system/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/usds/us-forms-system/git/refs{/sha}","trees_url":"https://api.github.com/repos/usds/us-forms-system/git/trees{/sha}","statuses_url":"https://api.github.com/repos/usds/us-forms-system/statuses/{sha}","languages_url":"https://api.github.com/repos/usds/us-forms-system/languages","stargazers_url":"https://api.github.com/repos/usds/us-forms-system/stargazers","contributors_url":"https://api.github.com/repos/usds/us-forms-system/contributors","subscribers_url":"https://api.github.com/repos/usds/us-forms-system/subscribers","subscription_url":"https://api.github.com/repos/usds/us-forms-system/subscription","commits_url":"https://api.github.com/repos/usds/us-forms-system/commits{/sha}","git_commits_url":"https://api.github.com/repos/usds/us-forms-system/git/commits{/sha}","comments_url":"https://api.github.com/repos/usds/us-forms-system/comments{/number}","issue_comment_url":"https://api.github.com/repos/usds/us-forms-system/issues/comments{/number}","contents_url":"https://api.github.com/repos/usds/us-forms-system/contents/{+path}","compare_url":"https://api.github.com/repos/usds/us-forms-system/compare/{base}...{head}","merges_url":"https://api.github.com/repos/usds/us-forms-system/merges","archive_url":"https://api.github.com/repos/usds/us-forms-system/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/usds/us-forms-system/downloads","issues_url":"https://api.github.com/repos/usds/us-forms-system/issues{/number}","pulls_url":"https://api.github.com/repos/usds/us-forms-system/pulls{/number}","milestones_url":"https://api.github.com/repos/usds/us-forms-system/milestones{/number}","notifications_url":"https://api.github.com/repos/usds/us-forms-system/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/usds/us-forms-system/labels{/name}","releases_url":"https://api.github.com/repos/usds/us-forms-system/releases{/id}","deployments_url":"https://api.github.com/repos/usds/us-forms-system/deployments","created_at":"2018-04-13T15:32:02Z","updated_at":"2018-07-26T18:00:35Z","pushed_at":"2018-07-30T18:36:06Z","git_url":"git://github.com/usds/us-forms-system.git","ssh_url":"git@github.com:usds/us-forms-system.git","clone_url":"https://github.com/usds/us-forms-system.git","svn_url":"https://github.com/usds/us-forms-system","homepage":null,"size":3212,"stargazers_count":20,"watchers_count":20,"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":56,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":5,"open_issues":56,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/usds/us-forms-system/pulls/196"},"html":{"href":"https://github.com/usds/us-forms-system/pull/196"},"issue":{"href":"https://api.github.com/repos/usds/us-forms-system/issues/196"},"comments":{"href":"https://api.github.com/repos/usds/us-forms-system/issues/196/comments"},"review_comments":{"href":"https://api.github.com/repos/usds/us-forms-system/pulls/196/comments"},"review_comment":{"href":"https://api.github.com/repos/usds/us-forms-system/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/usds/us-forms-system/pulls/196/commits"},"statuses":{"href":"https://api.github.com/repos/usds/us-forms-system/statuses/63d3ff071675a67021895ec80e28d214e7a8fbd4"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dmethvin-gov"}}