{"action":"opened","number":4816,"pull_request":{"url":"https://api.github.com/repos/concrete5/concrete5/pulls/4816","id":97621310,"html_url":"https://github.com/concrete5/concrete5/pull/4816","diff_url":"https://github.com/concrete5/concrete5/pull/4816.diff","patch_url":"https://github.com/concrete5/concrete5/pull/4816.patch","issue_url":"https://api.github.com/repos/concrete5/concrete5/issues/4816","number":4816,"state":"open","locked":false,"title":"Feature/exception response flow","user":{"login":"KorvinSzanto","id":1007419,"avatar_url":"https://avatars.githubusercontent.com/u/1007419?v=3","gravatar_id":"","url":"https://api.github.com/users/KorvinSzanto","html_url":"https://github.com/KorvinSzanto","followers_url":"https://api.github.com/users/KorvinSzanto/followers","following_url":"https://api.github.com/users/KorvinSzanto/following{/other_user}","gists_url":"https://api.github.com/users/KorvinSzanto/gists{/gist_id}","starred_url":"https://api.github.com/users/KorvinSzanto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KorvinSzanto/subscriptions","organizations_url":"https://api.github.com/users/KorvinSzanto/orgs","repos_url":"https://api.github.com/users/KorvinSzanto/repos","events_url":"https://api.github.com/users/KorvinSzanto/events{/privacy}","received_events_url":"https://api.github.com/users/KorvinSzanto/received_events","type":"User","site_admin":false},"body":"This seems to work great. See #4487 for more info.\r\n\r\nThe only potential caveat I can see is if a middleware catches all exceptions instead of just the ones they are trying to catch, they may filter out these redirects. Luckily that is an easy thing to fix.\r\n\r\n\r\n```php\r\ntry {\r\n    $response = $frame->next($request);\r\n} catch (\\Exception $e) {\r\n    if ($e instanceof HttpResponseException) {\r\n        throw $e; // Re-throw http response exceptions\r\n    }\r\n}\r\n```\r\n\r\nThe build will break for this since develop is currently breaking. Let's not merge this unless we've tested and the build is successful.\r\n\r\n--- \r\n\r\nNote: it's important that we get the order of this middleware set up properly. Do we want this exception to fall through all middleware (run the handler middleware first in the stack) or should our exception handler catch the exception first thing and return a proper response through the stack? (run the handler middleware just before the dispatcher middleware)","created_at":"2016-12-12T19:53:56Z","updated_at":"2016-12-12T19:53:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/concrete5/concrete5/pulls/4816/commits","review_comments_url":"https://api.github.com/repos/concrete5/concrete5/pulls/4816/comments","review_comment_url":"https://api.github.com/repos/concrete5/concrete5/pulls/comments{/number}","comments_url":"https://api.github.com/repos/concrete5/concrete5/issues/4816/comments","statuses_url":"https://api.github.com/repos/concrete5/concrete5/statuses/9ce0ecc9178f92d1425560f711124f14c83996ab","head":{"label":"concrete5:feature/exception-response-flow","ref":"feature/exception-response-flow","sha":"9ce0ecc9178f92d1425560f711124f14c83996ab","user":{"login":"concrete5","id":657929,"avatar_url":"https://avatars.githubusercontent.com/u/657929?v=3","gravatar_id":"","url":"https://api.github.com/users/concrete5","html_url":"https://github.com/concrete5","followers_url":"https://api.github.com/users/concrete5/followers","following_url":"https://api.github.com/users/concrete5/following{/other_user}","gists_url":"https://api.github.com/users/concrete5/gists{/gist_id}","starred_url":"https://api.github.com/users/concrete5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concrete5/subscriptions","organizations_url":"https://api.github.com/users/concrete5/orgs","repos_url":"https://api.github.com/users/concrete5/repos","events_url":"https://api.github.com/users/concrete5/events{/privacy}","received_events_url":"https://api.github.com/users/concrete5/received_events","type":"Organization","site_admin":false},"repo":{"id":19040482,"name":"concrete5","full_name":"concrete5/concrete5","owner":{"login":"concrete5","id":657929,"avatar_url":"https://avatars.githubusercontent.com/u/657929?v=3","gravatar_id":"","url":"https://api.github.com/users/concrete5","html_url":"https://github.com/concrete5","followers_url":"https://api.github.com/users/concrete5/followers","following_url":"https://api.github.com/users/concrete5/following{/other_user}","gists_url":"https://api.github.com/users/concrete5/gists{/gist_id}","starred_url":"https://api.github.com/users/concrete5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concrete5/subscriptions","organizations_url":"https://api.github.com/users/concrete5/orgs","repos_url":"https://api.github.com/users/concrete5/repos","events_url":"https://api.github.com/users/concrete5/events{/privacy}","received_events_url":"https://api.github.com/users/concrete5/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/concrete5/concrete5","description":"Official repository for concrete5 development","fork":false,"url":"https://api.github.com/repos/concrete5/concrete5","forks_url":"https://api.github.com/repos/concrete5/concrete5/forks","keys_url":"https://api.github.com/repos/concrete5/concrete5/keys{/key_id}","collaborators_url":"https://api.github.com/repos/concrete5/concrete5/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/concrete5/concrete5/teams","hooks_url":"https://api.github.com/repos/concrete5/concrete5/hooks","issue_events_url":"https://api.github.com/repos/concrete5/concrete5/issues/events{/number}","events_url":"https://api.github.com/repos/concrete5/concrete5/events","assignees_url":"https://api.github.com/repos/concrete5/concrete5/assignees{/user}","branches_url":"https://api.github.com/repos/concrete5/concrete5/branches{/branch}","tags_url":"https://api.github.com/repos/concrete5/concrete5/tags","blobs_url":"https://api.github.com/repos/concrete5/concrete5/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/concrete5/concrete5/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/concrete5/concrete5/git/refs{/sha}","trees_url":"https://api.github.com/repos/concrete5/concrete5/git/trees{/sha}","statuses_url":"https://api.github.com/repos/concrete5/concrete5/statuses/{sha}","languages_url":"https://api.github.com/repos/concrete5/concrete5/languages","stargazers_url":"https://api.github.com/repos/concrete5/concrete5/stargazers","contributors_url":"https://api.github.com/repos/concrete5/concrete5/contributors","subscribers_url":"https://api.github.com/repos/concrete5/concrete5/subscribers","subscription_url":"https://api.github.com/repos/concrete5/concrete5/subscription","commits_url":"https://api.github.com/repos/concrete5/concrete5/commits{/sha}","git_commits_url":"https://api.github.com/repos/concrete5/concrete5/git/commits{/sha}","comments_url":"https://api.github.com/repos/concrete5/concrete5/comments{/number}","issue_comment_url":"https://api.github.com/repos/concrete5/concrete5/issues/comments{/number}","contents_url":"https://api.github.com/repos/concrete5/concrete5/contents/{+path}","compare_url":"https://api.github.com/repos/concrete5/concrete5/compare/{base}...{head}","merges_url":"https://api.github.com/repos/concrete5/concrete5/merges","archive_url":"https://api.github.com/repos/concrete5/concrete5/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/concrete5/concrete5/downloads","issues_url":"https://api.github.com/repos/concrete5/concrete5/issues{/number}","pulls_url":"https://api.github.com/repos/concrete5/concrete5/pulls{/number}","milestones_url":"https://api.github.com/repos/concrete5/concrete5/milestones{/number}","notifications_url":"https://api.github.com/repos/concrete5/concrete5/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/concrete5/concrete5/labels{/name}","releases_url":"https://api.github.com/repos/concrete5/concrete5/releases{/id}","deployments_url":"https://api.github.com/repos/concrete5/concrete5/deployments","created_at":"2014-04-22T18:12:28Z","updated_at":"2016-12-12T07:51:15Z","pushed_at":"2016-12-12T19:35:14Z","git_url":"git://github.com/concrete5/concrete5.git","ssh_url":"git@github.com:concrete5/concrete5.git","clone_url":"https://github.com/concrete5/concrete5.git","svn_url":"https://github.com/concrete5/concrete5","homepage":"https://www.concrete5.org","size":232628,"stargazers_count":337,"watchers_count":337,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":278,"mirror_url":null,"open_issues_count":409,"forks":278,"open_issues":409,"watchers":337,"default_branch":"develop"}},"base":{"label":"concrete5:develop","ref":"develop","sha":"67dabd77145e042902a25c917e916b4903319fcb","user":{"login":"concrete5","id":657929,"avatar_url":"https://avatars.githubusercontent.com/u/657929?v=3","gravatar_id":"","url":"https://api.github.com/users/concrete5","html_url":"https://github.com/concrete5","followers_url":"https://api.github.com/users/concrete5/followers","following_url":"https://api.github.com/users/concrete5/following{/other_user}","gists_url":"https://api.github.com/users/concrete5/gists{/gist_id}","starred_url":"https://api.github.com/users/concrete5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concrete5/subscriptions","organizations_url":"https://api.github.com/users/concrete5/orgs","repos_url":"https://api.github.com/users/concrete5/repos","events_url":"https://api.github.com/users/concrete5/events{/privacy}","received_events_url":"https://api.github.com/users/concrete5/received_events","type":"Organization","site_admin":false},"repo":{"id":19040482,"name":"concrete5","full_name":"concrete5/concrete5","owner":{"login":"concrete5","id":657929,"avatar_url":"https://avatars.githubusercontent.com/u/657929?v=3","gravatar_id":"","url":"https://api.github.com/users/concrete5","html_url":"https://github.com/concrete5","followers_url":"https://api.github.com/users/concrete5/followers","following_url":"https://api.github.com/users/concrete5/following{/other_user}","gists_url":"https://api.github.com/users/concrete5/gists{/gist_id}","starred_url":"https://api.github.com/users/concrete5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concrete5/subscriptions","organizations_url":"https://api.github.com/users/concrete5/orgs","repos_url":"https://api.github.com/users/concrete5/repos","events_url":"https://api.github.com/users/concrete5/events{/privacy}","received_events_url":"https://api.github.com/users/concrete5/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/concrete5/concrete5","description":"Official repository for concrete5 development","fork":false,"url":"https://api.github.com/repos/concrete5/concrete5","forks_url":"https://api.github.com/repos/concrete5/concrete5/forks","keys_url":"https://api.github.com/repos/concrete5/concrete5/keys{/key_id}","collaborators_url":"https://api.github.com/repos/concrete5/concrete5/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/concrete5/concrete5/teams","hooks_url":"https://api.github.com/repos/concrete5/concrete5/hooks","issue_events_url":"https://api.github.com/repos/concrete5/concrete5/issues/events{/number}","events_url":"https://api.github.com/repos/concrete5/concrete5/events","assignees_url":"https://api.github.com/repos/concrete5/concrete5/assignees{/user}","branches_url":"https://api.github.com/repos/concrete5/concrete5/branches{/branch}","tags_url":"https://api.github.com/repos/concrete5/concrete5/tags","blobs_url":"https://api.github.com/repos/concrete5/concrete5/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/concrete5/concrete5/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/concrete5/concrete5/git/refs{/sha}","trees_url":"https://api.github.com/repos/concrete5/concrete5/git/trees{/sha}","statuses_url":"https://api.github.com/repos/concrete5/concrete5/statuses/{sha}","languages_url":"https://api.github.com/repos/concrete5/concrete5/languages","stargazers_url":"https://api.github.com/repos/concrete5/concrete5/stargazers","contributors_url":"https://api.github.com/repos/concrete5/concrete5/contributors","subscribers_url":"https://api.github.com/repos/concrete5/concrete5/subscribers","subscription_url":"https://api.github.com/repos/concrete5/concrete5/subscription","commits_url":"https://api.github.com/repos/concrete5/concrete5/commits{/sha}","git_commits_url":"https://api.github.com/repos/concrete5/concrete5/git/commits{/sha}","comments_url":"https://api.github.com/repos/concrete5/concrete5/comments{/number}","issue_comment_url":"https://api.github.com/repos/concrete5/concrete5/issues/comments{/number}","contents_url":"https://api.github.com/repos/concrete5/concrete5/contents/{+path}","compare_url":"https://api.github.com/repos/concrete5/concrete5/compare/{base}...{head}","merges_url":"https://api.github.com/repos/concrete5/concrete5/merges","archive_url":"https://api.github.com/repos/concrete5/concrete5/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/concrete5/concrete5/downloads","issues_url":"https://api.github.com/repos/concrete5/concrete5/issues{/number}","pulls_url":"https://api.github.com/repos/concrete5/concrete5/pulls{/number}","milestones_url":"https://api.github.com/repos/concrete5/concrete5/milestones{/number}","notifications_url":"https://api.github.com/repos/concrete5/concrete5/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/concrete5/concrete5/labels{/name}","releases_url":"https://api.github.com/repos/concrete5/concrete5/releases{/id}","deployments_url":"https://api.github.com/repos/concrete5/concrete5/deployments","created_at":"2014-04-22T18:12:28Z","updated_at":"2016-12-12T07:51:15Z","pushed_at":"2016-12-12T19:35:14Z","git_url":"git://github.com/concrete5/concrete5.git","ssh_url":"git@github.com:concrete5/concrete5.git","clone_url":"https://github.com/concrete5/concrete5.git","svn_url":"https://github.com/concrete5/concrete5","homepage":"https://www.concrete5.org","size":232628,"stargazers_count":337,"watchers_count":337,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":278,"mirror_url":null,"open_issues_count":409,"forks":278,"open_issues":409,"watchers":337,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/concrete5/concrete5/pulls/4816"},"html":{"href":"https://github.com/concrete5/concrete5/pull/4816"},"issue":{"href":"https://api.github.com/repos/concrete5/concrete5/issues/4816"},"comments":{"href":"https://api.github.com/repos/concrete5/concrete5/issues/4816/comments"},"review_comments":{"href":"https://api.github.com/repos/concrete5/concrete5/pulls/4816/comments"},"review_comment":{"href":"https://api.github.com/repos/concrete5/concrete5/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/concrete5/concrete5/pulls/4816/commits"},"statuses":{"href":"https://api.github.com/repos/concrete5/concrete5/statuses/9ce0ecc9178f92d1425560f711124f14c83996ab"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":439,"deletions":88,"changed_files":33}}
{"actor":{"display_login":"KorvinSzanto"}}