{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/1949","repository_url":"https://api.github.com/repos/Automattic/wp-calypso","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/1949/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/1949/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/1949/events","html_url":"https://github.com/Automattic/wp-calypso/pull/1949","id":123739402,"number":1949,"title":"Try catching JS errors and sending them to the API","user":{"login":"scruffian","id":275961,"avatar_url":"https://avatars.githubusercontent.com/u/275961?v=3","gravatar_id":"","url":"https://api.github.com/users/scruffian","html_url":"https://github.com/scruffian","followers_url":"https://api.github.com/users/scruffian/followers","following_url":"https://api.github.com/users/scruffian/following{/other_user}","gists_url":"https://api.github.com/users/scruffian/gists{/gist_id}","starred_url":"https://api.github.com/users/scruffian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scruffian/subscriptions","organizations_url":"https://api.github.com/users/scruffian/orgs","repos_url":"https://api.github.com/users/scruffian/repos","events_url":"https://api.github.com/users/scruffian/events{/privacy}","received_events_url":"https://api.github.com/users/scruffian/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Framework","name":"Framework","color":"006b75"},{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Type]%20Question","name":"[Type] Question","color":"cc317c"}],"state":"closed","locked":false,"assignee":{"login":"scruffian","id":275961,"avatar_url":"https://avatars.githubusercontent.com/u/275961?v=3","gravatar_id":"","url":"https://api.github.com/users/scruffian","html_url":"https://github.com/scruffian","followers_url":"https://api.github.com/users/scruffian/followers","following_url":"https://api.github.com/users/scruffian/following{/other_user}","gists_url":"https://api.github.com/users/scruffian/gists{/gist_id}","starred_url":"https://api.github.com/users/scruffian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scruffian/subscriptions","organizations_url":"https://api.github.com/users/scruffian/orgs","repos_url":"https://api.github.com/users/scruffian/repos","events_url":"https://api.github.com/users/scruffian/events{/privacy}","received_events_url":"https://api.github.com/users/scruffian/received_events","type":"User","site_admin":false},"milestone":null,"comments":24,"created_at":"2015-12-24T00:18:01Z","updated_at":"2016-02-04T14:50:17Z","closed_at":"2016-02-03T10:22:25Z","pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/1949","html_url":"https://github.com/Automattic/wp-calypso/pull/1949","diff_url":"https://github.com/Automattic/wp-calypso/pull/1949.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/1949.patch"},"body":"This will catch JS errors in production and send them to the API.\r\n\r\nTODOs\r\n- [x] Disable it in the development environment\r\n- [x] Restrict to only 1% of users.\r\n- [x] Use uglifyjs to build the file.\r\n\r\nTo test, edit some code so it throws a JS error. You should see the API request happen in the Network tab.\r\n\r\nTo make sure you are included in logging add this to your local storage:\r\nlocalStorage.setItem('log-errors', true);\r\n\r\nprops @drewblaisdell and @tug."},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/179879680","html_url":"https://github.com/Automattic/wp-calypso/pull/1949#issuecomment-179879680","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/1949","id":179879680,"user":{"login":"blowery","id":14350,"avatar_url":"https://avatars.githubusercontent.com/u/14350?v=3","gravatar_id":"","url":"https://api.github.com/users/blowery","html_url":"https://github.com/blowery","followers_url":"https://api.github.com/users/blowery/followers","following_url":"https://api.github.com/users/blowery/following{/other_user}","gists_url":"https://api.github.com/users/blowery/gists{/gist_id}","starred_url":"https://api.github.com/users/blowery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blowery/subscriptions","organizations_url":"https://api.github.com/users/blowery/orgs","repos_url":"https://api.github.com/users/blowery/repos","events_url":"https://api.github.com/users/blowery/events{/privacy}","received_events_url":"https://api.github.com/users/blowery/received_events","type":"User","site_admin":false},"created_at":"2016-02-04T14:50:17Z","updated_at":"2016-02-04T14:50:17Z","body":":tada: :+1: :100: "}}