{"action":"created","issue":{"url":"https://api.github.com/repos/getsentry/raven-node/issues/213","repository_url":"https://api.github.com/repos/getsentry/raven-node","labels_url":"https://api.github.com/repos/getsentry/raven-node/issues/213/labels{/name}","comments_url":"https://api.github.com/repos/getsentry/raven-node/issues/213/comments","events_url":"https://api.github.com/repos/getsentry/raven-node/issues/213/events","html_url":"https://github.com/getsentry/raven-node/issues/213","id":182241823,"number":213,"title":"Fix the API around capture* and handle callback correctly","user":{"login":"mattrobenolt","id":375744,"avatar_url":"https://avatars.githubusercontent.com/u/375744?v=3","gravatar_id":"","url":"https://api.github.com/users/mattrobenolt","html_url":"https://github.com/mattrobenolt","followers_url":"https://api.github.com/users/mattrobenolt/followers","following_url":"https://api.github.com/users/mattrobenolt/following{/other_user}","gists_url":"https://api.github.com/users/mattrobenolt/gists{/gist_id}","starred_url":"https://api.github.com/users/mattrobenolt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattrobenolt/subscriptions","organizations_url":"https://api.github.com/users/mattrobenolt/orgs","repos_url":"https://api.github.com/users/mattrobenolt/repos","events_url":"https://api.github.com/users/mattrobenolt/events{/privacy}","received_events_url":"https://api.github.com/users/mattrobenolt/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"LewisJEllis","id":1445984,"avatar_url":"https://avatars.githubusercontent.com/u/1445984?v=3","gravatar_id":"","url":"https://api.github.com/users/LewisJEllis","html_url":"https://github.com/LewisJEllis","followers_url":"https://api.github.com/users/LewisJEllis/followers","following_url":"https://api.github.com/users/LewisJEllis/following{/other_user}","gists_url":"https://api.github.com/users/LewisJEllis/gists{/gist_id}","starred_url":"https://api.github.com/users/LewisJEllis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LewisJEllis/subscriptions","organizations_url":"https://api.github.com/users/LewisJEllis/orgs","repos_url":"https://api.github.com/users/LewisJEllis/repos","events_url":"https://api.github.com/users/LewisJEllis/events{/privacy}","received_events_url":"https://api.github.com/users/LewisJEllis/received_events","type":"User","site_admin":false},"assignees":[{"login":"LewisJEllis","id":1445984,"avatar_url":"https://avatars.githubusercontent.com/u/1445984?v=3","gravatar_id":"","url":"https://api.github.com/users/LewisJEllis","html_url":"https://github.com/LewisJEllis","followers_url":"https://api.github.com/users/LewisJEllis/followers","following_url":"https://api.github.com/users/LewisJEllis/following{/other_user}","gists_url":"https://api.github.com/users/LewisJEllis/gists{/gist_id}","starred_url":"https://api.github.com/users/LewisJEllis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LewisJEllis/subscriptions","organizations_url":"https://api.github.com/users/LewisJEllis/orgs","repos_url":"https://api.github.com/users/LewisJEllis/repos","events_url":"https://api.github.com/users/LewisJEllis/events{/privacy}","received_events_url":"https://api.github.com/users/LewisJEllis/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-10-11T11:40:33Z","updated_at":"2016-10-26T02:02:06Z","closed_at":"2016-10-26T02:02:06Z","body":"Due to legacy reasons, `capture*`'s callback was to get the eventId.\r\n\r\nSo the current API is:\r\n\r\n```javascript\r\nclient.captureError(new Error(), function(result) {\r\n  console.log(client.getIdent(result));\r\n});\r\n```\r\n\r\nThis entire pattern is basically deprecated and unnecessary now for Node.\r\n\r\nIdeally, we'd have a pattern like this now:\r\n\r\n```javascript\r\nvar eventId = client.captureError(new Error(), function(err) {\r\n  console.log(err);\r\n});\r\n```\r\n\r\nWhere the callback now indicates when the event has been sent or failed to send. And there's no reason now that we can't return the event id immediately.\r\n\r\nThis should be done for a 1.0 imo since this is a major breaking API change, but for the better."},"comment":{"url":"https://api.github.com/repos/getsentry/raven-node/issues/comments/256229874","html_url":"https://github.com/getsentry/raven-node/issues/213#issuecomment-256229874","issue_url":"https://api.github.com/repos/getsentry/raven-node/issues/213","id":256229874,"user":{"login":"LewisJEllis","id":1445984,"avatar_url":"https://avatars.githubusercontent.com/u/1445984?v=3","gravatar_id":"","url":"https://api.github.com/users/LewisJEllis","html_url":"https://github.com/LewisJEllis","followers_url":"https://api.github.com/users/LewisJEllis/followers","following_url":"https://api.github.com/users/LewisJEllis/following{/other_user}","gists_url":"https://api.github.com/users/LewisJEllis/gists{/gist_id}","starred_url":"https://api.github.com/users/LewisJEllis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LewisJEllis/subscriptions","organizations_url":"https://api.github.com/users/LewisJEllis/orgs","repos_url":"https://api.github.com/users/LewisJEllis/repos","events_url":"https://api.github.com/users/LewisJEllis/events{/privacy}","received_events_url":"https://api.github.com/users/LewisJEllis/received_events","type":"User","site_admin":false},"created_at":"2016-10-26T02:02:06Z","updated_at":"2016-10-26T02:02:06Z","body":"Addressed by #217."}}
{"actor":{"display_login":"LewisJEllis"}}