{"action":"created","comment":{"url":"https://api.github.com/repos/airbnb/hypernova/pulls/comments/77417192","id":77417192,"diff_hunk":"@@ -2,8 +2,13 @@ function errorToSerializable(error) {\n   // istanbul ignore next\n   if (error === undefined) throw new TypeError('No error was passed');\n \n-  // make sure it is an error object so we can serialize it properly\n-  const err = error instanceof Error ? error : new Error(error);\n+  // make sure it is an object that is Error-like so we can serialize it properly\n+  // if it's not an actual error then we won't create an Error so that there is no stack trace\n+  // because no stack trace is better than a stack trace that is generated here.\n+  const err = typeof error === 'object' && typeof error.stack === 'string'","path":"src/utils/BatchManager.js","position":9,"original_position":9,"commit_id":"1ed51fee00bb5eb1c4825edbafd72315115e4db3","original_commit_id":"1ed51fee00bb5eb1c4825edbafd72315115e4db3","user":{"login":"goatslacker","id":10632,"avatar_url":"https://avatars.githubusercontent.com/u/10632?v=3","gravatar_id":"","url":"https://api.github.com/users/goatslacker","html_url":"https://github.com/goatslacker","followers_url":"https://api.github.com/users/goatslacker/followers","following_url":"https://api.github.com/users/goatslacker/following{/other_user}","gists_url":"https://api.github.com/users/goatslacker/gists{/gist_id}","starred_url":"https://api.github.com/users/goatslacker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goatslacker/subscriptions","organizations_url":"https://api.github.com/users/goatslacker/orgs","repos_url":"https://api.github.com/users/goatslacker/repos","events_url":"https://api.github.com/users/goatslacker/events{/privacy}","received_events_url":"https://api.github.com/users/goatslacker/received_events","type":"User","site_admin":false},"body":"I kinda like the loose requirements now, means that you can pass in a POJO with a custom stack. Although I'm not sure what you'd use this for.","created_at":"2016-09-02T21:56:00Z","updated_at":"2016-09-02T21:56:00Z","html_url":"https://github.com/airbnb/hypernova/pull/34#discussion_r77417192","pull_request_url":"https://api.github.com/repos/airbnb/hypernova/pulls/34","_links":{"self":{"href":"https://api.github.com/repos/airbnb/hypernova/pulls/comments/77417192"},"html":{"href":"https://github.com/airbnb/hypernova/pull/34#discussion_r77417192"},"pull_request":{"href":"https://api.github.com/repos/airbnb/hypernova/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/airbnb/hypernova/pulls/34","id":83865237,"html_url":"https://github.com/airbnb/hypernova/pull/34","diff_url":"https://github.com/airbnb/hypernova/pull/34.diff","patch_url":"https://github.com/airbnb/hypernova/pull/34.patch","issue_url":"https://api.github.com/repos/airbnb/hypernova/issues/34","number":34,"state":"open","locked":false,"title":"Fixes exception handling stack traces","user":{"login":"goatslacker","id":10632,"avatar_url":"https://avatars.githubusercontent.com/u/10632?v=3","gravatar_id":"","url":"https://api.github.com/users/goatslacker","html_url":"https://github.com/goatslacker","followers_url":"https://api.github.com/users/goatslacker/followers","following_url":"https://api.github.com/users/goatslacker/following{/other_user}","gists_url":"https://api.github.com/users/goatslacker/gists{/gist_id}","starred_url":"https://api.github.com/users/goatslacker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goatslacker/subscriptions","organizations_url":"https://api.github.com/users/goatslacker/orgs","repos_url":"https://api.github.com/users/goatslacker/repos","events_url":"https://api.github.com/users/goatslacker/events{/privacy}","received_events_url":"https://api.github.com/users/goatslacker/received_events","type":"User","site_admin":false},"body":"On some cases we pass/throw a non-error, we used to wrap that in an\r\nError and then serialize that new error. The problem with that approach\r\nis that the stack trace would be completely lost.\r\n\r\nNow we either include the original stack trace or no stack trace at all.\r\nBecause an incorrect stack trace is worse than no stack trace.\r\n\r\n@ljharb @lencioni ","created_at":"2016-09-02T21:12:15Z","updated_at":"2016-09-02T21:56:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"478b8555f285e1ffe8eff62034f926b377250ea7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/airbnb/hypernova/pulls/34/commits","review_comments_url":"https://api.github.com/repos/airbnb/hypernova/pulls/34/comments","review_comment_url":"https://api.github.com/repos/airbnb/hypernova/pulls/comments{/number}","comments_url":"https://api.github.com/repos/airbnb/hypernova/issues/34/comments","statuses_url":"https://api.github.com/repos/airbnb/hypernova/statuses/1ed51fee00bb5eb1c4825edbafd72315115e4db3","head":{"label":"airbnb:make-error-handling-better","ref":"make-error-handling-better","sha":"1ed51fee00bb5eb1c4825edbafd72315115e4db3","user":{"login":"airbnb","id":698437,"avatar_url":"https://avatars.githubusercontent.com/u/698437?v=3","gravatar_id":"","url":"https://api.github.com/users/airbnb","html_url":"https://github.com/airbnb","followers_url":"https://api.github.com/users/airbnb/followers","following_url":"https://api.github.com/users/airbnb/following{/other_user}","gists_url":"https://api.github.com/users/airbnb/gists{/gist_id}","starred_url":"https://api.github.com/users/airbnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbnb/subscriptions","organizations_url":"https://api.github.com/users/airbnb/orgs","repos_url":"https://api.github.com/users/airbnb/repos","events_url":"https://api.github.com/users/airbnb/events{/privacy}","received_events_url":"https://api.github.com/users/airbnb/received_events","type":"Organization","site_admin":false},"repo":{"id":60133112,"name":"hypernova","full_name":"airbnb/hypernova","owner":{"login":"airbnb","id":698437,"avatar_url":"https://avatars.githubusercontent.com/u/698437?v=3","gravatar_id":"","url":"https://api.github.com/users/airbnb","html_url":"https://github.com/airbnb","followers_url":"https://api.github.com/users/airbnb/followers","following_url":"https://api.github.com/users/airbnb/following{/other_user}","gists_url":"https://api.github.com/users/airbnb/gists{/gist_id}","starred_url":"https://api.github.com/users/airbnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbnb/subscriptions","organizations_url":"https://api.github.com/users/airbnb/orgs","repos_url":"https://api.github.com/users/airbnb/repos","events_url":"https://api.github.com/users/airbnb/events{/privacy}","received_events_url":"https://api.github.com/users/airbnb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/airbnb/hypernova","description":"A service for server-side rendering your JavaScript views","fork":false,"url":"https://api.github.com/repos/airbnb/hypernova","forks_url":"https://api.github.com/repos/airbnb/hypernova/forks","keys_url":"https://api.github.com/repos/airbnb/hypernova/keys{/key_id}","collaborators_url":"https://api.github.com/repos/airbnb/hypernova/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/airbnb/hypernova/teams","hooks_url":"https://api.github.com/repos/airbnb/hypernova/hooks","issue_events_url":"https://api.github.com/repos/airbnb/hypernova/issues/events{/number}","events_url":"https://api.github.com/repos/airbnb/hypernova/events","assignees_url":"https://api.github.com/repos/airbnb/hypernova/assignees{/user}","branches_url":"https://api.github.com/repos/airbnb/hypernova/branches{/branch}","tags_url":"https://api.github.com/repos/airbnb/hypernova/tags","blobs_url":"https://api.github.com/repos/airbnb/hypernova/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/airbnb/hypernova/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/airbnb/hypernova/git/refs{/sha}","trees_url":"https://api.github.com/repos/airbnb/hypernova/git/trees{/sha}","statuses_url":"https://api.github.com/repos/airbnb/hypernova/statuses/{sha}","languages_url":"https://api.github.com/repos/airbnb/hypernova/languages","stargazers_url":"https://api.github.com/repos/airbnb/hypernova/stargazers","contributors_url":"https://api.github.com/repos/airbnb/hypernova/contributors","subscribers_url":"https://api.github.com/repos/airbnb/hypernova/subscribers","subscription_url":"https://api.github.com/repos/airbnb/hypernova/subscription","commits_url":"https://api.github.com/repos/airbnb/hypernova/commits{/sha}","git_commits_url":"https://api.github.com/repos/airbnb/hypernova/git/commits{/sha}","comments_url":"https://api.github.com/repos/airbnb/hypernova/comments{/number}","issue_comment_url":"https://api.github.com/repos/airbnb/hypernova/issues/comments{/number}","contents_url":"https://api.github.com/repos/airbnb/hypernova/contents/{+path}","compare_url":"https://api.github.com/repos/airbnb/hypernova/compare/{base}...{head}","merges_url":"https://api.github.com/repos/airbnb/hypernova/merges","archive_url":"https://api.github.com/repos/airbnb/hypernova/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/airbnb/hypernova/downloads","issues_url":"https://api.github.com/repos/airbnb/hypernova/issues{/number}","pulls_url":"https://api.github.com/repos/airbnb/hypernova/pulls{/number}","milestones_url":"https://api.github.com/repos/airbnb/hypernova/milestones{/number}","notifications_url":"https://api.github.com/repos/airbnb/hypernova/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/airbnb/hypernova/labels{/name}","releases_url":"https://api.github.com/repos/airbnb/hypernova/releases{/id}","deployments_url":"https://api.github.com/repos/airbnb/hypernova/deployments","created_at":"2016-06-01T00:34:24Z","updated_at":"2016-09-02T17:15:37Z","pushed_at":"2016-09-02T21:12:15Z","git_url":"git://github.com/airbnb/hypernova.git","ssh_url":"git@github.com:airbnb/hypernova.git","clone_url":"https://github.com/airbnb/hypernova.git","svn_url":"https://github.com/airbnb/hypernova","homepage":"","size":124,"stargazers_count":2174,"watchers_count":2174,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":51,"mirror_url":null,"open_issues_count":6,"forks":51,"open_issues":6,"watchers":2174,"default_branch":"master"}},"base":{"label":"airbnb:master","ref":"master","sha":"f5e02d3ec8e0fb2cdc2ccb32619191b4e2eb08b3","user":{"login":"airbnb","id":698437,"avatar_url":"https://avatars.githubusercontent.com/u/698437?v=3","gravatar_id":"","url":"https://api.github.com/users/airbnb","html_url":"https://github.com/airbnb","followers_url":"https://api.github.com/users/airbnb/followers","following_url":"https://api.github.com/users/airbnb/following{/other_user}","gists_url":"https://api.github.com/users/airbnb/gists{/gist_id}","starred_url":"https://api.github.com/users/airbnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbnb/subscriptions","organizations_url":"https://api.github.com/users/airbnb/orgs","repos_url":"https://api.github.com/users/airbnb/repos","events_url":"https://api.github.com/users/airbnb/events{/privacy}","received_events_url":"https://api.github.com/users/airbnb/received_events","type":"Organization","site_admin":false},"repo":{"id":60133112,"name":"hypernova","full_name":"airbnb/hypernova","owner":{"login":"airbnb","id":698437,"avatar_url":"https://avatars.githubusercontent.com/u/698437?v=3","gravatar_id":"","url":"https://api.github.com/users/airbnb","html_url":"https://github.com/airbnb","followers_url":"https://api.github.com/users/airbnb/followers","following_url":"https://api.github.com/users/airbnb/following{/other_user}","gists_url":"https://api.github.com/users/airbnb/gists{/gist_id}","starred_url":"https://api.github.com/users/airbnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbnb/subscriptions","organizations_url":"https://api.github.com/users/airbnb/orgs","repos_url":"https://api.github.com/users/airbnb/repos","events_url":"https://api.github.com/users/airbnb/events{/privacy}","received_events_url":"https://api.github.com/users/airbnb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/airbnb/hypernova","description":"A service for server-side rendering your JavaScript views","fork":false,"url":"https://api.github.com/repos/airbnb/hypernova","forks_url":"https://api.github.com/repos/airbnb/hypernova/forks","keys_url":"https://api.github.com/repos/airbnb/hypernova/keys{/key_id}","collaborators_url":"https://api.github.com/repos/airbnb/hypernova/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/airbnb/hypernova/teams","hooks_url":"https://api.github.com/repos/airbnb/hypernova/hooks","issue_events_url":"https://api.github.com/repos/airbnb/hypernova/issues/events{/number}","events_url":"https://api.github.com/repos/airbnb/hypernova/events","assignees_url":"https://api.github.com/repos/airbnb/hypernova/assignees{/user}","branches_url":"https://api.github.com/repos/airbnb/hypernova/branches{/branch}","tags_url":"https://api.github.com/repos/airbnb/hypernova/tags","blobs_url":"https://api.github.com/repos/airbnb/hypernova/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/airbnb/hypernova/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/airbnb/hypernova/git/refs{/sha}","trees_url":"https://api.github.com/repos/airbnb/hypernova/git/trees{/sha}","statuses_url":"https://api.github.com/repos/airbnb/hypernova/statuses/{sha}","languages_url":"https://api.github.com/repos/airbnb/hypernova/languages","stargazers_url":"https://api.github.com/repos/airbnb/hypernova/stargazers","contributors_url":"https://api.github.com/repos/airbnb/hypernova/contributors","subscribers_url":"https://api.github.com/repos/airbnb/hypernova/subscribers","subscription_url":"https://api.github.com/repos/airbnb/hypernova/subscription","commits_url":"https://api.github.com/repos/airbnb/hypernova/commits{/sha}","git_commits_url":"https://api.github.com/repos/airbnb/hypernova/git/commits{/sha}","comments_url":"https://api.github.com/repos/airbnb/hypernova/comments{/number}","issue_comment_url":"https://api.github.com/repos/airbnb/hypernova/issues/comments{/number}","contents_url":"https://api.github.com/repos/airbnb/hypernova/contents/{+path}","compare_url":"https://api.github.com/repos/airbnb/hypernova/compare/{base}...{head}","merges_url":"https://api.github.com/repos/airbnb/hypernova/merges","archive_url":"https://api.github.com/repos/airbnb/hypernova/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/airbnb/hypernova/downloads","issues_url":"https://api.github.com/repos/airbnb/hypernova/issues{/number}","pulls_url":"https://api.github.com/repos/airbnb/hypernova/pulls{/number}","milestones_url":"https://api.github.com/repos/airbnb/hypernova/milestones{/number}","notifications_url":"https://api.github.com/repos/airbnb/hypernova/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/airbnb/hypernova/labels{/name}","releases_url":"https://api.github.com/repos/airbnb/hypernova/releases{/id}","deployments_url":"https://api.github.com/repos/airbnb/hypernova/deployments","created_at":"2016-06-01T00:34:24Z","updated_at":"2016-09-02T17:15:37Z","pushed_at":"2016-09-02T21:12:15Z","git_url":"git://github.com/airbnb/hypernova.git","ssh_url":"git@github.com:airbnb/hypernova.git","clone_url":"https://github.com/airbnb/hypernova.git","svn_url":"https://github.com/airbnb/hypernova","homepage":"","size":124,"stargazers_count":2174,"watchers_count":2174,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":51,"mirror_url":null,"open_issues_count":6,"forks":51,"open_issues":6,"watchers":2174,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/airbnb/hypernova/pulls/34"},"html":{"href":"https://github.com/airbnb/hypernova/pull/34"},"issue":{"href":"https://api.github.com/repos/airbnb/hypernova/issues/34"},"comments":{"href":"https://api.github.com/repos/airbnb/hypernova/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/airbnb/hypernova/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/airbnb/hypernova/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/airbnb/hypernova/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/airbnb/hypernova/statuses/1ed51fee00bb5eb1c4825edbafd72315115e4db3"}}}}
{"actor":{"display_login":"goatslacker"}}