{"action":"opened","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/9214","repository_url":"https://api.github.com/repos/cakephp/cakephp","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/9214/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/9214/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/9214/events","html_url":"https://github.com/cakephp/cakephp/issues/9214","id":169583629,"number":9214,"title":"Configuration `Error.exceptionRenderer` doesn't work in middleware stack","user":{"login":"batopa","id":1306319,"avatar_url":"https://avatars.githubusercontent.com/u/1306319?v=3","gravatar_id":"","url":"https://api.github.com/users/batopa","html_url":"https://github.com/batopa","followers_url":"https://api.github.com/users/batopa/followers","following_url":"https://api.github.com/users/batopa/following{/other_user}","gists_url":"https://api.github.com/users/batopa/gists{/gist_id}","starred_url":"https://api.github.com/users/batopa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/batopa/subscriptions","organizations_url":"https://api.github.com/users/batopa/orgs","repos_url":"https://api.github.com/users/batopa/repos","events_url":"https://api.github.com/users/batopa/events{/privacy}","received_events_url":"https://api.github.com/users/batopa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-05T11:03:28Z","updated_at":"2016-08-05T11:03:28Z","closed_at":null,"body":"This is a (multiple allowed):\r\n* [x] bug\r\n* [ ] enhancement\r\n* [ ] feature-discussion (RFC)\r\n\r\n* CakePHP Version: 3.3.0-beta3 and 3.next branch.\r\n* Platform and Target: apache, mysql, any request that throws an exception\r\n\r\n### What you did\r\nIn `config/app.php` I have configured a custom exception renderer\r\n\r\n```php\r\n'Error' => [\r\n        'errorLevel' => E_ALL & ~E_DEPRECATED,\r\n        'exceptionRenderer' => 'App\\Error\\ExceptionRenderer',\r\n        'skipLog' => [],\r\n        'log' => true,\r\n        'trace' => true,\r\n    ],\r\n```\r\n\r\n### Expected Behavior\r\nI expect that any exception was handled by `App\\Error\\ExceptionRenderer`\r\n\r\n### Actual Behavior\r\nEvery excepetion is handeld by `Cake\\Error\\ExceptionRenderer`.\r\n\r\nI think that  `Cake\\Error\\Middleware\\ErrorHandlerMiddleware` should be read from configuration if custom exception renderer must be used instead of default.\r\n\r\nThe only way I found to use my custom renderer is pass it to `ErrorHandlerMiddleware` constructor in `Application.php`.\r\n"}}
{"actor":{"display_login":"batopa"}}