{"action":"created","issue":{"url":"https://api.github.com/repos/ninjaframework/ninja/issues/304","labels_url":"https://api.github.com/repos/ninjaframework/ninja/issues/304/labels{/name}","comments_url":"https://api.github.com/repos/ninjaframework/ninja/issues/304/comments","events_url":"https://api.github.com/repos/ninjaframework/ninja/issues/304/events","html_url":"https://github.com/ninjaframework/ninja/issues/304","id":57081796,"number":304,"title":"BadRequestException accepts String detail message but it's not used or log anywhere","user":{"login":"bircow","id":383059,"avatar_url":"https://avatars.githubusercontent.com/u/383059?v=3","gravatar_id":"","url":"https://api.github.com/users/bircow","html_url":"https://github.com/bircow","followers_url":"https://api.github.com/users/bircow/followers","following_url":"https://api.github.com/users/bircow/following{/other_user}","gists_url":"https://api.github.com/users/bircow/gists{/gist_id}","starred_url":"https://api.github.com/users/bircow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bircow/subscriptions","organizations_url":"https://api.github.com/users/bircow/orgs","repos_url":"https://api.github.com/users/bircow/repos","events_url":"https://api.github.com/users/bircow/events{/privacy}","received_events_url":"https://api.github.com/users/bircow/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-09T20:01:56Z","updated_at":"2015-03-05T02:01:25Z","closed_at":null,"body":"It would be nice if exception message sent to BadRequest(String message) is not lost but logged and passed to 400badRequest.ftl.thml template.\r\n\r\nI'm Ninja for just about 1 hour so far and still dont' understend rending enough but I suggest to change `.render()` (highlighted) in `NinjaDefault.getBadRequestResult(Context, Exception)`\r\n\r\n```\r\n@Override\r\npublic Result getBadRequestResult(Context context, Exception exception) {\r\n    \r\n    String messageI18n \r\n            = messages.getWithDefault(\r\n                    NinjaConstant.I18N_NINJA_SYSTEM_BAD_REQUEST_TEXT_KEY,\r\n                    NinjaConstant.I18N_NINJA_SYSTEM_BAD_REQUEST_TEXT_DEFAULT,\r\n                    context,\r\n                    Optional.<Result>absent());\r\n    \r\n    Message message = new Message(messageI18n); \r\n\r\n\tResult result = Results\r\n\t\t    .badRequest()\r\n\t\t    .supportedContentTypes(Result.TEXT_HTML, Result.APPLICATION_JSON, Result.APPLICATION_XML)\r\n\t\t    .fallbackContentType(Result.TEXT_HTML)\r\n\t>>>>>>  .render(message)   <<<<<<<<\r\n\t\t    .template(NinjaConstant.LOCATION_VIEW_FTL_HTML_BAD_REQUEST);\r\n\t\t    \r\n\treturn result;\r\n```\r\n\r\nto something like `.render(Message).render(\"exception\", exception)`?\r\n\r\nAlso if accepted, docs should be updated accordingly.\r\n"},"comment":{"url":"https://api.github.com/repos/ninjaframework/ninja/issues/comments/77292038","html_url":"https://github.com/ninjaframework/ninja/issues/304#issuecomment-77292038","issue_url":"https://api.github.com/repos/ninjaframework/ninja/issues/304","id":77292038,"user":{"login":"jjlauer","id":585730,"avatar_url":"https://avatars.githubusercontent.com/u/585730?v=3","gravatar_id":"","url":"https://api.github.com/users/jjlauer","html_url":"https://github.com/jjlauer","followers_url":"https://api.github.com/users/jjlauer/followers","following_url":"https://api.github.com/users/jjlauer/following{/other_user}","gists_url":"https://api.github.com/users/jjlauer/gists{/gist_id}","starred_url":"https://api.github.com/users/jjlauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjlauer/subscriptions","organizations_url":"https://api.github.com/users/jjlauer/orgs","repos_url":"https://api.github.com/users/jjlauer/repos","events_url":"https://api.github.com/users/jjlauer/events{/privacy}","received_events_url":"https://api.github.com/users/jjlauer/received_events","type":"User","site_admin":false},"created_at":"2015-03-05T02:01:25Z","updated_at":"2015-03-05T02:01:25Z","body":"Hey @raphaelbauer -- I think some of the work I've been putting in on a \"Diagnostic\" mode enhancement for Dev mode may help @bircow \r\n\r\nIt's mostly while in dev mode that I find more detailed error messages about what went wrong nice to have.  When not in dev mode then you want to actually display the system template for the particular error.\r\n\r\nSee https://github.com/ninjaframework/ninja/pull/324 for some of my ideas"}}