{"action":"created","comment":{"url":"https://api.github.com/repos/bugsnag/bugsnag-node/pulls/comments/31291044","id":31291044,"diff_hunk":"@@ -101,6 +101,18 @@ module.exports = Bugsnag = (function() {\n     }, autoNotifyCallback(err));\n   };\n \n+  Bugsnag.koaHandler = function(err, ctx) {\n+    var request;\n+    Configuration.logger.info(\"Handling koa error: \" + (err.stack || err));\n+    request = ctx.req;\n+    request.protocol = ctx.request.protocol;","path":"lib/bugsnag.js","position":8,"original_position":8,"commit_id":"0b522fd93112910cd987939526558456503b0321","original_commit_id":"0b522fd93112910cd987939526558456503b0321","user":{"login":"dtaniwaki","id":1162120,"avatar_url":"https://avatars.githubusercontent.com/u/1162120?v=3","gravatar_id":"","url":"https://api.github.com/users/dtaniwaki","html_url":"https://github.com/dtaniwaki","followers_url":"https://api.github.com/users/dtaniwaki/followers","following_url":"https://api.github.com/users/dtaniwaki/following{/other_user}","gists_url":"https://api.github.com/users/dtaniwaki/gists{/gist_id}","starred_url":"https://api.github.com/users/dtaniwaki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtaniwaki/subscriptions","organizations_url":"https://api.github.com/users/dtaniwaki/orgs","repos_url":"https://api.github.com/users/dtaniwaki/repos","events_url":"https://api.github.com/users/dtaniwaki/events{/privacy}","received_events_url":"https://api.github.com/users/dtaniwaki/received_events","type":"User","site_admin":false},"body":"@snmaynard Did you see this part?\r\nIf you directly use bugsnag to notify the error, it doesn't handle protocol/host correctly in Koa.","created_at":"2015-05-29T00:33:06Z","updated_at":"2015-05-29T00:33:06Z","html_url":"https://github.com/bugsnag/bugsnag-node/pull/39#discussion_r31291044","pull_request_url":"https://api.github.com/repos/bugsnag/bugsnag-node/pulls/39","_links":{"self":{"href":"https://api.github.com/repos/bugsnag/bugsnag-node/pulls/comments/31291044"},"html":{"href":"https://github.com/bugsnag/bugsnag-node/pull/39#discussion_r31291044"},"pull_request":{"href":"https://api.github.com/repos/bugsnag/bugsnag-node/pulls/39"}}},"pull_request":{"url":"https://api.github.com/repos/bugsnag/bugsnag-node/pulls/39","id":22129010,"html_url":"https://github.com/bugsnag/bugsnag-node/pull/39","diff_url":"https://github.com/bugsnag/bugsnag-node/pull/39.diff","patch_url":"https://github.com/bugsnag/bugsnag-node/pull/39.patch","issue_url":"https://api.github.com/repos/bugsnag/bugsnag-node/issues/39","number":39,"state":"closed","locked":false,"title":"Support koa","user":{"login":"dtaniwaki","id":1162120,"avatar_url":"https://avatars.githubusercontent.com/u/1162120?v=3","gravatar_id":"","url":"https://api.github.com/users/dtaniwaki","html_url":"https://github.com/dtaniwaki","followers_url":"https://api.github.com/users/dtaniwaki/followers","following_url":"https://api.github.com/users/dtaniwaki/following{/other_user}","gists_url":"https://api.github.com/users/dtaniwaki/gists{/gist_id}","starred_url":"https://api.github.com/users/dtaniwaki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtaniwaki/subscriptions","organizations_url":"https://api.github.com/users/dtaniwaki/orgs","repos_url":"https://api.github.com/users/dtaniwaki/repos","events_url":"https://api.github.com/users/dtaniwaki/events{/privacy}","received_events_url":"https://api.github.com/users/dtaniwaki/received_events","type":"User","site_admin":false},"body":"Please support Koa!\r\n\r\nThanks.\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/bugsnag/bugsnag-node/39)\n<!-- Reviewable:end -->\n","created_at":"2014-10-02T09:29:34Z","updated_at":"2015-05-29T00:33:06Z","closed_at":"2015-01-09T04:22:16Z","merged_at":"2015-01-09T04:22:16Z","merge_commit_sha":"055873b086d6dc10b270137af519df46e4580287","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bugsnag/bugsnag-node/pulls/39/commits","review_comments_url":"https://api.github.com/repos/bugsnag/bugsnag-node/pulls/39/comments","review_comment_url":"https://api.github.com/repos/bugsnag/bugsnag-node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bugsnag/bugsnag-node/issues/39/comments","statuses_url":"https://api.github.com/repos/bugsnag/bugsnag-node/statuses/0b522fd93112910cd987939526558456503b0321","head":{"label":"dtaniwaki:support-koa","ref":"support-koa","sha":"0b522fd93112910cd987939526558456503b0321","user":{"login":"dtaniwaki","id":1162120,"avatar_url":"https://avatars.githubusercontent.com/u/1162120?v=3","gravatar_id":"","url":"https://api.github.com/users/dtaniwaki","html_url":"https://github.com/dtaniwaki","followers_url":"https://api.github.com/users/dtaniwaki/followers","following_url":"https://api.github.com/users/dtaniwaki/following{/other_user}","gists_url":"https://api.github.com/users/dtaniwaki/gists{/gist_id}","starred_url":"https://api.github.com/users/dtaniwaki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtaniwaki/subscriptions","organizations_url":"https://api.github.com/users/dtaniwaki/orgs","repos_url":"https://api.github.com/users/dtaniwaki/repos","events_url":"https://api.github.com/users/dtaniwaki/events{/privacy}","received_events_url":"https://api.github.com/users/dtaniwaki/received_events","type":"User","site_admin":false},"repo":{"id":24642393,"name":"bugsnag-node","full_name":"dtaniwaki/bugsnag-node","owner":{"login":"dtaniwaki","id":1162120,"avatar_url":"https://avatars.githubusercontent.com/u/1162120?v=3","gravatar_id":"","url":"https://api.github.com/users/dtaniwaki","html_url":"https://github.com/dtaniwaki","followers_url":"https://api.github.com/users/dtaniwaki/followers","following_url":"https://api.github.com/users/dtaniwaki/following{/other_user}","gists_url":"https://api.github.com/users/dtaniwaki/gists{/gist_id}","starred_url":"https://api.github.com/users/dtaniwaki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtaniwaki/subscriptions","organizations_url":"https://api.github.com/users/dtaniwaki/orgs","repos_url":"https://api.github.com/users/dtaniwaki/repos","events_url":"https://api.github.com/users/dtaniwaki/events{/privacy}","received_events_url":"https://api.github.com/users/dtaniwaki/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dtaniwaki/bugsnag-node","description":"Bugsnag node notifier","fork":true,"url":"https://api.github.com/repos/dtaniwaki/bugsnag-node","forks_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/forks","keys_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/teams","hooks_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/hooks","issue_events_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/issues/events{/number}","events_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/events","assignees_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/assignees{/user}","branches_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/branches{/branch}","tags_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/tags","blobs_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/statuses/{sha}","languages_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/languages","stargazers_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/stargazers","contributors_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/contributors","subscribers_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/subscribers","subscription_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/subscription","commits_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/contents/{+path}","compare_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/merges","archive_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/downloads","issues_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/issues{/number}","pulls_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/pulls{/number}","milestones_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/milestones{/number}","notifications_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/labels{/name}","releases_url":"https://api.github.com/repos/dtaniwaki/bugsnag-node/releases{/id}","created_at":"2014-09-30T14:57:55Z","updated_at":"2014-09-29T17:17:53Z","pushed_at":"2015-01-14T02:10:51Z","git_url":"git://github.com/dtaniwaki/bugsnag-node.git","ssh_url":"git@github.com:dtaniwaki/bugsnag-node.git","clone_url":"https://github.com/dtaniwaki/bugsnag-node.git","svn_url":"https://github.com/dtaniwaki/bugsnag-node","homepage":"bugsnag.com","size":305,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bugsnag:master","ref":"master","sha":"432ea55278b734e9ee1d1b096b97e2018e5cf573","user":{"login":"bugsnag","id":1058895,"avatar_url":"https://avatars.githubusercontent.com/u/1058895?v=3","gravatar_id":"","url":"https://api.github.com/users/bugsnag","html_url":"https://github.com/bugsnag","followers_url":"https://api.github.com/users/bugsnag/followers","following_url":"https://api.github.com/users/bugsnag/following{/other_user}","gists_url":"https://api.github.com/users/bugsnag/gists{/gist_id}","starred_url":"https://api.github.com/users/bugsnag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugsnag/subscriptions","organizations_url":"https://api.github.com/users/bugsnag/orgs","repos_url":"https://api.github.com/users/bugsnag/repos","events_url":"https://api.github.com/users/bugsnag/events{/privacy}","received_events_url":"https://api.github.com/users/bugsnag/received_events","type":"Organization","site_admin":false},"repo":{"id":3187201,"name":"bugsnag-node","full_name":"bugsnag/bugsnag-node","owner":{"login":"bugsnag","id":1058895,"avatar_url":"https://avatars.githubusercontent.com/u/1058895?v=3","gravatar_id":"","url":"https://api.github.com/users/bugsnag","html_url":"https://github.com/bugsnag","followers_url":"https://api.github.com/users/bugsnag/followers","following_url":"https://api.github.com/users/bugsnag/following{/other_user}","gists_url":"https://api.github.com/users/bugsnag/gists{/gist_id}","starred_url":"https://api.github.com/users/bugsnag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugsnag/subscriptions","organizations_url":"https://api.github.com/users/bugsnag/orgs","repos_url":"https://api.github.com/users/bugsnag/repos","events_url":"https://api.github.com/users/bugsnag/events{/privacy}","received_events_url":"https://api.github.com/users/bugsnag/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bugsnag/bugsnag-node","description":"Bugsnag node notifier","fork":false,"url":"https://api.github.com/repos/bugsnag/bugsnag-node","forks_url":"https://api.github.com/repos/bugsnag/bugsnag-node/forks","keys_url":"https://api.github.com/repos/bugsnag/bugsnag-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bugsnag/bugsnag-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bugsnag/bugsnag-node/teams","hooks_url":"https://api.github.com/repos/bugsnag/bugsnag-node/hooks","issue_events_url":"https://api.github.com/repos/bugsnag/bugsnag-node/issues/events{/number}","events_url":"https://api.github.com/repos/bugsnag/bugsnag-node/events","assignees_url":"https://api.github.com/repos/bugsnag/bugsnag-node/assignees{/user}","branches_url":"https://api.github.com/repos/bugsnag/bugsnag-node/branches{/branch}","tags_url":"https://api.github.com/repos/bugsnag/bugsnag-node/tags","blobs_url":"https://api.github.com/repos/bugsnag/bugsnag-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bugsnag/bugsnag-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bugsnag/bugsnag-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/bugsnag/bugsnag-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bugsnag/bugsnag-node/statuses/{sha}","languages_url":"https://api.github.com/repos/bugsnag/bugsnag-node/languages","stargazers_url":"https://api.github.com/repos/bugsnag/bugsnag-node/stargazers","contributors_url":"https://api.github.com/repos/bugsnag/bugsnag-node/contributors","subscribers_url":"https://api.github.com/repos/bugsnag/bugsnag-node/subscribers","subscription_url":"https://api.github.com/repos/bugsnag/bugsnag-node/subscription","commits_url":"https://api.github.com/repos/bugsnag/bugsnag-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/bugsnag/bugsnag-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/bugsnag/bugsnag-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/bugsnag/bugsnag-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/bugsnag/bugsnag-node/contents/{+path}","compare_url":"https://api.github.com/repos/bugsnag/bugsnag-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bugsnag/bugsnag-node/merges","archive_url":"https://api.github.com/repos/bugsnag/bugsnag-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bugsnag/bugsnag-node/downloads","issues_url":"https://api.github.com/repos/bugsnag/bugsnag-node/issues{/number}","pulls_url":"https://api.github.com/repos/bugsnag/bugsnag-node/pulls{/number}","milestones_url":"https://api.github.com/repos/bugsnag/bugsnag-node/milestones{/number}","notifications_url":"https://api.github.com/repos/bugsnag/bugsnag-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bugsnag/bugsnag-node/labels{/name}","releases_url":"https://api.github.com/repos/bugsnag/bugsnag-node/releases{/id}","created_at":"2012-01-16T01:20:40Z","updated_at":"2015-04-22T03:26:48Z","pushed_at":"2015-04-22T03:09:28Z","git_url":"git://github.com/bugsnag/bugsnag-node.git","ssh_url":"git@github.com:bugsnag/bugsnag-node.git","clone_url":"https://github.com/bugsnag/bugsnag-node.git","svn_url":"https://github.com/bugsnag/bugsnag-node","homepage":"bugsnag.com","size":1086,"stargazers_count":17,"watchers_count":17,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":2,"forks":22,"open_issues":2,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bugsnag/bugsnag-node/pulls/39"},"html":{"href":"https://github.com/bugsnag/bugsnag-node/pull/39"},"issue":{"href":"https://api.github.com/repos/bugsnag/bugsnag-node/issues/39"},"comments":{"href":"https://api.github.com/repos/bugsnag/bugsnag-node/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/bugsnag/bugsnag-node/pulls/39/comments"},"review_comment":{"href":"https://api.github.com/repos/bugsnag/bugsnag-node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bugsnag/bugsnag-node/pulls/39/commits"},"statuses":{"href":"https://api.github.com/repos/bugsnag/bugsnag-node/statuses/0b522fd93112910cd987939526558456503b0321"}}}}