{"action":"created","issue":{"url":"https://api.github.com/repos/djc/quinn/issues/51","repository_url":"https://api.github.com/repos/djc/quinn","labels_url":"https://api.github.com/repos/djc/quinn/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/djc/quinn/issues/51/comments","events_url":"https://api.github.com/repos/djc/quinn/issues/51/events","html_url":"https://github.com/djc/quinn/issues/51","id":367586550,"node_id":"MDU6SXNzdWUzNjc1ODY1NTA=","number":51,"title":"Factor out common error handling code","user":{"login":"djc","id":158471,"node_id":"MDQ6VXNlcjE1ODQ3MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/158471?v=4","gravatar_id":"","url":"https://api.github.com/users/djc","html_url":"https://github.com/djc","followers_url":"https://api.github.com/users/djc/followers","following_url":"https://api.github.com/users/djc/following{/other_user}","gists_url":"https://api.github.com/users/djc/gists{/gist_id}","starred_url":"https://api.github.com/users/djc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djc/subscriptions","organizations_url":"https://api.github.com/users/djc/orgs","repos_url":"https://api.github.com/users/djc/repos","events_url":"https://api.github.com/users/djc/events{/privacy}","received_events_url":"https://api.github.com/users/djc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-07T19:42:36Z","updated_at":"2018-10-07T20:17:25Z","closed_at":null,"author_association":"OWNER","body":"There is a lot of repetition in error handling code in methods of the `Connection` impl. There are multiple ways this could be improved, in increasing order of complexity:\r\n\r\n* Factor them out into one or more utility methods\r\n* Create a nice error type that this returned to `Endpoint` so it do the proper handling in one place\r\n* In doing so, make it so that the `Connection` no longer has to know its `ConnectionHandle`\r\n\r\n@Ralith does that make sense to you? @twilco this is a little more open-ended, but I think you can ramp it up by taking it one step at a time to gain some familiarity with the issues."},"comment":{"url":"https://api.github.com/repos/djc/quinn/issues/comments/427683521","html_url":"https://github.com/djc/quinn/issues/51#issuecomment-427683521","issue_url":"https://api.github.com/repos/djc/quinn/issues/51","id":427683521,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzY4MzUyMQ==","user":{"login":"Ralith","id":104558,"node_id":"MDQ6VXNlcjEwNDU1OA==","avatar_url":"https://avatars2.githubusercontent.com/u/104558?v=4","gravatar_id":"","url":"https://api.github.com/users/Ralith","html_url":"https://github.com/Ralith","followers_url":"https://api.github.com/users/Ralith/followers","following_url":"https://api.github.com/users/Ralith/following{/other_user}","gists_url":"https://api.github.com/users/Ralith/gists{/gist_id}","starred_url":"https://api.github.com/users/Ralith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ralith/subscriptions","organizations_url":"https://api.github.com/users/Ralith/orgs","repos_url":"https://api.github.com/users/Ralith/repos","events_url":"https://api.github.com/users/Ralith/events{/privacy}","received_events_url":"https://api.github.com/users/Ralith/received_events","type":"User","site_admin":false},"created_at":"2018-10-07T20:17:25Z","updated_at":"2018-10-07T20:17:25Z","author_association":"COLLABORATOR","body":"This would be good to have; in particular, it may be possible to refactor `Connection::handle_connected_inner` to return a `Result<State, ConnectionError>` or something similar, with `Endpoint` worrying about how to convert that into a state transition and generate any necessary I/O and events.\r\n\r\nRemoving the `ConnectionHandle` goes a bit beyond the above, but will certainly be an easier task once that's done."}}
{"actor":{"display_login":"Ralith"}}