{"action":"created","issue":{"url":"https://api.github.com/repos/getsentry/raven-js/issues/330","labels_url":"https://api.github.com/repos/getsentry/raven-js/issues/330/labels{/name}","comments_url":"https://api.github.com/repos/getsentry/raven-js/issues/330/comments","events_url":"https://api.github.com/repos/getsentry/raven-js/issues/330/events","html_url":"https://github.com/getsentry/raven-js/pull/330","id":60431121,"number":330,"title":"Improve the capture of unhandled errors from promises","user":{"login":"joeyespo","id":634573,"avatar_url":"https://avatars.githubusercontent.com/u/634573?v=3","gravatar_id":"","url":"https://api.github.com/users/joeyespo","html_url":"https://github.com/joeyespo","followers_url":"https://api.github.com/users/joeyespo/followers","following_url":"https://api.github.com/users/joeyespo/following{/other_user}","gists_url":"https://api.github.com/users/joeyespo/gists{/gist_id}","starred_url":"https://api.github.com/users/joeyespo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeyespo/subscriptions","organizations_url":"https://api.github.com/users/joeyespo/orgs","repos_url":"https://api.github.com/users/joeyespo/repos","events_url":"https://api.github.com/users/joeyespo/events{/privacy}","received_events_url":"https://api.github.com/users/joeyespo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-10T00:08:57Z","updated_at":"2015-05-17T20:20:04Z","closed_at":"2015-05-16T19:20:17Z","pull_request":{"url":"https://api.github.com/repos/getsentry/raven-js/pulls/330","html_url":"https://github.com/getsentry/raven-js/pull/330","diff_url":"https://github.com/getsentry/raven-js/pull/330.diff","patch_url":"https://github.com/getsentry/raven-js/pull/330.patch"},"body":"After using the code behind #319 for about a week, we ran into a little problem.\r\n\r\nEven though it's recommended that `Promise.reject` passes in an `Error` instance, not all 3rd-party libraries do. This lead to production errors with `[object Object]` as the error message, which wasn't very helpful.\r\n\r\nThis fixes the problem by creating a new error (for the stack trace), if one wasn't provided, and passing the `reason` object as `extra` context.\r\n"},"comment":{"url":"https://api.github.com/repos/getsentry/raven-js/issues/comments/102847859","html_url":"https://github.com/getsentry/raven-js/pull/330#issuecomment-102847859","issue_url":"https://api.github.com/repos/getsentry/raven-js/issues/330","id":102847859,"user":{"login":"joeyespo","id":634573,"avatar_url":"https://avatars.githubusercontent.com/u/634573?v=3","gravatar_id":"","url":"https://api.github.com/users/joeyespo","html_url":"https://github.com/joeyespo","followers_url":"https://api.github.com/users/joeyespo/followers","following_url":"https://api.github.com/users/joeyespo/following{/other_user}","gists_url":"https://api.github.com/users/joeyespo/gists{/gist_id}","starred_url":"https://api.github.com/users/joeyespo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeyespo/subscriptions","organizations_url":"https://api.github.com/users/joeyespo/orgs","repos_url":"https://api.github.com/users/joeyespo/repos","events_url":"https://api.github.com/users/joeyespo/events{/privacy}","received_events_url":"https://api.github.com/users/joeyespo/received_events","type":"User","site_admin":false},"created_at":"2015-05-17T20:20:04Z","updated_at":"2015-05-17T20:20:04Z","body":"@mattrobenolt Haha, I'm sure someone will. Such is continuous improvement. Thanks!\r\n"}}