{"action":"closed","issue":{"url":"https://api.github.com/repos/PerlDancer/Dancer2/issues/565","labels_url":"https://api.github.com/repos/PerlDancer/Dancer2/issues/565/labels{/name}","comments_url":"https://api.github.com/repos/PerlDancer/Dancer2/issues/565/comments","events_url":"https://api.github.com/repos/PerlDancer/Dancer2/issues/565/events","html_url":"https://github.com/PerlDancer/Dancer2/issues/565","id":31148942,"number":565,"title":"config error_template does not work","user":{"login":"baynes","id":1922472,"avatar_url":"https://avatars.githubusercontent.com/u/1922472?v=3","gravatar_id":"","url":"https://api.github.com/users/baynes","html_url":"https://github.com/baynes","followers_url":"https://api.github.com/users/baynes/followers","following_url":"https://api.github.com/users/baynes/following{/other_user}","gists_url":"https://api.github.com/users/baynes/gists{/gist_id}","starred_url":"https://api.github.com/users/baynes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baynes/subscriptions","organizations_url":"https://api.github.com/users/baynes/orgs","repos_url":"https://api.github.com/users/baynes/repos","events_url":"https://api.github.com/users/baynes/events{/privacy}","received_events_url":"https://api.github.com/users/baynes/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-04-09T11:27:04Z","updated_at":"2015-02-23T22:33:44Z","closed_at":"2015-02-23T22:33:44Z","body":"According to Dancer2::Config one can \r\n\r\nerror_template (template path)\r\n\r\nThis setting lets you specify a template to be used in case of runtime error. At the present moment the template can use three variables:\r\n\r\nHowever this does not work.\r\n\r\nDelving in Dancer2::Core::Error it seems that what it actually does is\r\n  use a serializer if one is set\r\n  use $views/$error_code.tt if exists [ not documented ]\r\n  use $public/$error_code.html if exists\r\n  use default generated in code\r\n\r\nThe sub _render_html which seems to be the relevant code for rendering the template specified by error_template is not called anywhere.\r\n\r\nI think the correct sequence should be:\r\n  use a serializer if one is set\r\n  use $views/$error_code.tt if exists\r\n  use $public/$error_code.html if exists\r\n  use error_template if specified\r\n  use default generated in code\r\n\r\n\r\nThe documentation under Dancer2::Config show_errors which attempts to document this sequence will need to be updated. This is also wrong in that even when set to true the same error pages is generated, just the details are tacked on to the end. The wording implies it generates the detailed page another way. [Or is that intended and current behaviour is another bug?[\r\n\r\n"}}