{"action":"created","issue":{"url":"https://api.github.com/repos/aio-libs/aiohttp_debugtoolbar/issues/45","repository_url":"https://api.github.com/repos/aio-libs/aiohttp_debugtoolbar","labels_url":"https://api.github.com/repos/aio-libs/aiohttp_debugtoolbar/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/aio-libs/aiohttp_debugtoolbar/issues/45/comments","events_url":"https://api.github.com/repos/aio-libs/aiohttp_debugtoolbar/issues/45/events","html_url":"https://github.com/aio-libs/aiohttp_debugtoolbar/issues/45","id":178848019,"number":45,"title":"HTTPInternalServerError message not displayed","user":{"login":"samuelcolvin","id":4039449,"avatar_url":"https://avatars.githubusercontent.com/u/4039449?v=3","gravatar_id":"","url":"https://api.github.com/users/samuelcolvin","html_url":"https://github.com/samuelcolvin","followers_url":"https://api.github.com/users/samuelcolvin/followers","following_url":"https://api.github.com/users/samuelcolvin/following{/other_user}","gists_url":"https://api.github.com/users/samuelcolvin/gists{/gist_id}","starred_url":"https://api.github.com/users/samuelcolvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuelcolvin/subscriptions","organizations_url":"https://api.github.com/users/samuelcolvin/orgs","repos_url":"https://api.github.com/users/samuelcolvin/repos","events_url":"https://api.github.com/users/samuelcolvin/events{/privacy}","received_events_url":"https://api.github.com/users/samuelcolvin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-23T11:02:05Z","updated_at":"2016-09-25T18:58:39Z","closed_at":null,"body":"In the following screen shot aiohttp_jinja has tried really hard to provide a helpful message along with the 500 response however aiohttp_debugtoolbar isn't showing that message.\r\n\r\nI guess a fix is as simple as including `exc.args`?\r\n\r\n![image](https://cloud.githubusercontent.com/assets/4039449/18783713/50ac55f0-8185-11e6-9b7b-512a987d78bd.png)\r\n"},"comment":{"url":"https://api.github.com/repos/aio-libs/aiohttp_debugtoolbar/issues/comments/249439463","html_url":"https://github.com/aio-libs/aiohttp_debugtoolbar/issues/45#issuecomment-249439463","issue_url":"https://api.github.com/repos/aio-libs/aiohttp_debugtoolbar/issues/45","id":249439463,"user":{"login":"jettify","id":223335,"avatar_url":"https://avatars.githubusercontent.com/u/223335?v=3","gravatar_id":"","url":"https://api.github.com/users/jettify","html_url":"https://github.com/jettify","followers_url":"https://api.github.com/users/jettify/followers","following_url":"https://api.github.com/users/jettify/following{/other_user}","gists_url":"https://api.github.com/users/jettify/gists{/gist_id}","starred_url":"https://api.github.com/users/jettify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jettify/subscriptions","organizations_url":"https://api.github.com/users/jettify/orgs","repos_url":"https://api.github.com/users/jettify/repos","events_url":"https://api.github.com/users/jettify/events{/privacy}","received_events_url":"https://api.github.com/users/jettify/received_events","type":"User","site_admin":false},"created_at":"2016-09-25T18:58:39Z","updated_at":"2016-09-25T18:58:39Z","body":"I investigated this issue, toolbar extracts error message, which is `Internal Server Error`, text that was generated from `jinja2` is not exception message but payload for response with 500 status code. In order have nice message in `aiottp_jinja2` we should do following\r\n```python\r\n    try:\r\n        template = env.get_template(template_name)\r\n    except jinja2.TemplateNotFound as e:\r\n        msg = \"Template '{}' not found\".format(template_name)\r\n        raise web.HTTPInternalServerError(text=msg, reason=msg) from e\r\n```"}}
{"actor":{"display_login":"jettify"}}