{"action":"opened","number":101,"pull_request":{"url":"https://api.github.com/repos/HenningM/express-ws/pulls/101","id":205478645,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1NDc4NjQ1","html_url":"https://github.com/HenningM/express-ws/pull/101","diff_url":"https://github.com/HenningM/express-ws/pull/101.diff","patch_url":"https://github.com/HenningM/express-ws/pull/101.patch","issue_url":"https://api.github.com/repos/HenningM/express-ws/issues/101","number":101,"state":"open","locked":false,"title":"Return the middleware's result so that async error handling works.","user":{"login":"N-McA","id":8830910,"node_id":"MDQ6VXNlcjg4MzA5MTA=","avatar_url":"https://avatars1.githubusercontent.com/u/8830910?v=4","gravatar_id":"","url":"https://api.github.com/users/N-McA","html_url":"https://github.com/N-McA","followers_url":"https://api.github.com/users/N-McA/followers","following_url":"https://api.github.com/users/N-McA/following{/other_user}","gists_url":"https://api.github.com/users/N-McA/gists{/gist_id}","starred_url":"https://api.github.com/users/N-McA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/N-McA/subscriptions","organizations_url":"https://api.github.com/users/N-McA/orgs","repos_url":"https://api.github.com/users/N-McA/repos","events_url":"https://api.github.com/users/N-McA/events{/privacy}","received_events_url":"https://api.github.com/users/N-McA/received_events","type":"User","site_admin":false},"body":"By returning the result of the middleware, promise chaining can be done elsewhere. An example of why this is (very) useful is given by\r\n\r\nhttps://github.com/N-McA/express-ws-async-error-fail-example\r\n\r\nWhich shows the lack of interoperability that occurs without the suggested change.","created_at":"2018-08-01T16:15:10Z","updated_at":"2018-08-01T16:15:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/HenningM/express-ws/pulls/101/commits","review_comments_url":"https://api.github.com/repos/HenningM/express-ws/pulls/101/comments","review_comment_url":"https://api.github.com/repos/HenningM/express-ws/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HenningM/express-ws/issues/101/comments","statuses_url":"https://api.github.com/repos/HenningM/express-ws/statuses/f5310438d8be22b78f0096947b47c030789a64e4","head":{"label":"N-McA:master","ref":"master","sha":"f5310438d8be22b78f0096947b47c030789a64e4","user":{"login":"N-McA","id":8830910,"node_id":"MDQ6VXNlcjg4MzA5MTA=","avatar_url":"https://avatars1.githubusercontent.com/u/8830910?v=4","gravatar_id":"","url":"https://api.github.com/users/N-McA","html_url":"https://github.com/N-McA","followers_url":"https://api.github.com/users/N-McA/followers","following_url":"https://api.github.com/users/N-McA/following{/other_user}","gists_url":"https://api.github.com/users/N-McA/gists{/gist_id}","starred_url":"https://api.github.com/users/N-McA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/N-McA/subscriptions","organizations_url":"https://api.github.com/users/N-McA/orgs","repos_url":"https://api.github.com/users/N-McA/repos","events_url":"https://api.github.com/users/N-McA/events{/privacy}","received_events_url":"https://api.github.com/users/N-McA/received_events","type":"User","site_admin":false},"repo":{"id":143177284,"node_id":"MDEwOlJlcG9zaXRvcnkxNDMxNzcyODQ=","name":"express-ws","full_name":"N-McA/express-ws","owner":{"login":"N-McA","id":8830910,"node_id":"MDQ6VXNlcjg4MzA5MTA=","avatar_url":"https://avatars1.githubusercontent.com/u/8830910?v=4","gravatar_id":"","url":"https://api.github.com/users/N-McA","html_url":"https://github.com/N-McA","followers_url":"https://api.github.com/users/N-McA/followers","following_url":"https://api.github.com/users/N-McA/following{/other_user}","gists_url":"https://api.github.com/users/N-McA/gists{/gist_id}","starred_url":"https://api.github.com/users/N-McA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/N-McA/subscriptions","organizations_url":"https://api.github.com/users/N-McA/orgs","repos_url":"https://api.github.com/users/N-McA/repos","events_url":"https://api.github.com/users/N-McA/events{/privacy}","received_events_url":"https://api.github.com/users/N-McA/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/N-McA/express-ws","description":"WebSocket endpoints for express applications","fork":true,"url":"https://api.github.com/repos/N-McA/express-ws","forks_url":"https://api.github.com/repos/N-McA/express-ws/forks","keys_url":"https://api.github.com/repos/N-McA/express-ws/keys{/key_id}","collaborators_url":"https://api.github.com/repos/N-McA/express-ws/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/N-McA/express-ws/teams","hooks_url":"https://api.github.com/repos/N-McA/express-ws/hooks","issue_events_url":"https://api.github.com/repos/N-McA/express-ws/issues/events{/number}","events_url":"https://api.github.com/repos/N-McA/express-ws/events","assignees_url":"https://api.github.com/repos/N-McA/express-ws/assignees{/user}","branches_url":"https://api.github.com/repos/N-McA/express-ws/branches{/branch}","tags_url":"https://api.github.com/repos/N-McA/express-ws/tags","blobs_url":"https://api.github.com/repos/N-McA/express-ws/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/N-McA/express-ws/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/N-McA/express-ws/git/refs{/sha}","trees_url":"https://api.github.com/repos/N-McA/express-ws/git/trees{/sha}","statuses_url":"https://api.github.com/repos/N-McA/express-ws/statuses/{sha}","languages_url":"https://api.github.com/repos/N-McA/express-ws/languages","stargazers_url":"https://api.github.com/repos/N-McA/express-ws/stargazers","contributors_url":"https://api.github.com/repos/N-McA/express-ws/contributors","subscribers_url":"https://api.github.com/repos/N-McA/express-ws/subscribers","subscription_url":"https://api.github.com/repos/N-McA/express-ws/subscription","commits_url":"https://api.github.com/repos/N-McA/express-ws/commits{/sha}","git_commits_url":"https://api.github.com/repos/N-McA/express-ws/git/commits{/sha}","comments_url":"https://api.github.com/repos/N-McA/express-ws/comments{/number}","issue_comment_url":"https://api.github.com/repos/N-McA/express-ws/issues/comments{/number}","contents_url":"https://api.github.com/repos/N-McA/express-ws/contents/{+path}","compare_url":"https://api.github.com/repos/N-McA/express-ws/compare/{base}...{head}","merges_url":"https://api.github.com/repos/N-McA/express-ws/merges","archive_url":"https://api.github.com/repos/N-McA/express-ws/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/N-McA/express-ws/downloads","issues_url":"https://api.github.com/repos/N-McA/express-ws/issues{/number}","pulls_url":"https://api.github.com/repos/N-McA/express-ws/pulls{/number}","milestones_url":"https://api.github.com/repos/N-McA/express-ws/milestones{/number}","notifications_url":"https://api.github.com/repos/N-McA/express-ws/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/N-McA/express-ws/labels{/name}","releases_url":"https://api.github.com/repos/N-McA/express-ws/releases{/id}","deployments_url":"https://api.github.com/repos/N-McA/express-ws/deployments","created_at":"2018-08-01T15:52:07Z","updated_at":"2018-08-01T15:54:39Z","pushed_at":"2018-08-01T15:54:37Z","git_url":"git://github.com/N-McA/express-ws.git","ssh_url":"git@github.com:N-McA/express-ws.git","clone_url":"https://github.com/N-McA/express-ws.git","svn_url":"https://github.com/N-McA/express-ws","homepage":null,"size":47,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause","node_id":"MDc6TGljZW5zZTQ="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"HenningM:master","ref":"master","sha":"11928f260bcb4f4897879bf09c8abe32ca4c65f2","user":{"login":"HenningM","id":200462,"node_id":"MDQ6VXNlcjIwMDQ2Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/200462?v=4","gravatar_id":"","url":"https://api.github.com/users/HenningM","html_url":"https://github.com/HenningM","followers_url":"https://api.github.com/users/HenningM/followers","following_url":"https://api.github.com/users/HenningM/following{/other_user}","gists_url":"https://api.github.com/users/HenningM/gists{/gist_id}","starred_url":"https://api.github.com/users/HenningM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HenningM/subscriptions","organizations_url":"https://api.github.com/users/HenningM/orgs","repos_url":"https://api.github.com/users/HenningM/repos","events_url":"https://api.github.com/users/HenningM/events{/privacy}","received_events_url":"https://api.github.com/users/HenningM/received_events","type":"User","site_admin":false},"repo":{"id":17750059,"node_id":"MDEwOlJlcG9zaXRvcnkxNzc1MDA1OQ==","name":"express-ws","full_name":"HenningM/express-ws","owner":{"login":"HenningM","id":200462,"node_id":"MDQ6VXNlcjIwMDQ2Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/200462?v=4","gravatar_id":"","url":"https://api.github.com/users/HenningM","html_url":"https://github.com/HenningM","followers_url":"https://api.github.com/users/HenningM/followers","following_url":"https://api.github.com/users/HenningM/following{/other_user}","gists_url":"https://api.github.com/users/HenningM/gists{/gist_id}","starred_url":"https://api.github.com/users/HenningM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HenningM/subscriptions","organizations_url":"https://api.github.com/users/HenningM/orgs","repos_url":"https://api.github.com/users/HenningM/repos","events_url":"https://api.github.com/users/HenningM/events{/privacy}","received_events_url":"https://api.github.com/users/HenningM/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/HenningM/express-ws","description":"WebSocket endpoints for express applications","fork":false,"url":"https://api.github.com/repos/HenningM/express-ws","forks_url":"https://api.github.com/repos/HenningM/express-ws/forks","keys_url":"https://api.github.com/repos/HenningM/express-ws/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HenningM/express-ws/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HenningM/express-ws/teams","hooks_url":"https://api.github.com/repos/HenningM/express-ws/hooks","issue_events_url":"https://api.github.com/repos/HenningM/express-ws/issues/events{/number}","events_url":"https://api.github.com/repos/HenningM/express-ws/events","assignees_url":"https://api.github.com/repos/HenningM/express-ws/assignees{/user}","branches_url":"https://api.github.com/repos/HenningM/express-ws/branches{/branch}","tags_url":"https://api.github.com/repos/HenningM/express-ws/tags","blobs_url":"https://api.github.com/repos/HenningM/express-ws/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HenningM/express-ws/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HenningM/express-ws/git/refs{/sha}","trees_url":"https://api.github.com/repos/HenningM/express-ws/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HenningM/express-ws/statuses/{sha}","languages_url":"https://api.github.com/repos/HenningM/express-ws/languages","stargazers_url":"https://api.github.com/repos/HenningM/express-ws/stargazers","contributors_url":"https://api.github.com/repos/HenningM/express-ws/contributors","subscribers_url":"https://api.github.com/repos/HenningM/express-ws/subscribers","subscription_url":"https://api.github.com/repos/HenningM/express-ws/subscription","commits_url":"https://api.github.com/repos/HenningM/express-ws/commits{/sha}","git_commits_url":"https://api.github.com/repos/HenningM/express-ws/git/commits{/sha}","comments_url":"https://api.github.com/repos/HenningM/express-ws/comments{/number}","issue_comment_url":"https://api.github.com/repos/HenningM/express-ws/issues/comments{/number}","contents_url":"https://api.github.com/repos/HenningM/express-ws/contents/{+path}","compare_url":"https://api.github.com/repos/HenningM/express-ws/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HenningM/express-ws/merges","archive_url":"https://api.github.com/repos/HenningM/express-ws/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HenningM/express-ws/downloads","issues_url":"https://api.github.com/repos/HenningM/express-ws/issues{/number}","pulls_url":"https://api.github.com/repos/HenningM/express-ws/pulls{/number}","milestones_url":"https://api.github.com/repos/HenningM/express-ws/milestones{/number}","notifications_url":"https://api.github.com/repos/HenningM/express-ws/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HenningM/express-ws/labels{/name}","releases_url":"https://api.github.com/repos/HenningM/express-ws/releases{/id}","deployments_url":"https://api.github.com/repos/HenningM/express-ws/deployments","created_at":"2014-03-14T15:06:34Z","updated_at":"2018-08-01T11:50:23Z","pushed_at":"2018-06-06T15:11:18Z","git_url":"git://github.com/HenningM/express-ws.git","ssh_url":"git@github.com:HenningM/express-ws.git","clone_url":"https://github.com/HenningM/express-ws.git","svn_url":"https://github.com/HenningM/express-ws","homepage":null,"size":47,"stargazers_count":397,"watchers_count":397,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":78,"mirror_url":null,"archived":false,"open_issues_count":39,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause","node_id":"MDc6TGljZW5zZTQ="},"forks":78,"open_issues":39,"watchers":397,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HenningM/express-ws/pulls/101"},"html":{"href":"https://github.com/HenningM/express-ws/pull/101"},"issue":{"href":"https://api.github.com/repos/HenningM/express-ws/issues/101"},"comments":{"href":"https://api.github.com/repos/HenningM/express-ws/issues/101/comments"},"review_comments":{"href":"https://api.github.com/repos/HenningM/express-ws/pulls/101/comments"},"review_comment":{"href":"https://api.github.com/repos/HenningM/express-ws/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HenningM/express-ws/pulls/101/commits"},"statuses":{"href":"https://api.github.com/repos/HenningM/express-ws/statuses/f5310438d8be22b78f0096947b47c030789a64e4"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"N-McA"}}