{"action":"closed","issue":{"url":"https://api.github.com/repos/hapijs/discuss/issues/158","labels_url":"https://api.github.com/repos/hapijs/discuss/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/hapijs/discuss/issues/158/comments","events_url":"https://api.github.com/repos/hapijs/discuss/issues/158/events","html_url":"https://github.com/hapijs/discuss/issues/158","id":105408316,"number":158,"title":"failAction has no onPreFailAction ?","user":{"login":"yodutouf","id":5493780,"avatar_url":"https://avatars.githubusercontent.com/u/5493780?v=3","gravatar_id":"","url":"https://api.github.com/users/yodutouf","html_url":"https://github.com/yodutouf","followers_url":"https://api.github.com/users/yodutouf/followers","following_url":"https://api.github.com/users/yodutouf/following{/other_user}","gists_url":"https://api.github.com/users/yodutouf/gists{/gist_id}","starred_url":"https://api.github.com/users/yodutouf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yodutouf/subscriptions","organizations_url":"https://api.github.com/users/yodutouf/orgs","repos_url":"https://api.github.com/users/yodutouf/repos","events_url":"https://api.github.com/users/yodutouf/events{/privacy}","received_events_url":"https://api.github.com/users/yodutouf/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-08T15:39:54Z","updated_at":"2015-09-09T11:22:50Z","closed_at":"2015-09-09T11:22:50Z","body":"I am beginner with Hapi and Node. \r\n\r\nI start using the plug-in https://github.com/codeva/hapi-i18n\r\n\r\nI make a a simple form, and when the form data validation fails, I displays my form again.\r\nBut I meet an error because the i18n is not injected into the request from the failAction method.\r\nLooking at the plugin code, it uses the onPreHandler and onPreResponse to inject data to the request but this is not called when failAction is called.\r\n\r\nIs there any workaround to achieve using i18n with the failAction method ?\r\n\r\nHere my server routing config\r\n\r\n      server.route({\r\n        method: ['GET'],\r\n        path: '/publish',\r\n        config: {\r\n            handler: function (request, reply) {\r\n                console.log(\"request \", request.payload)\r\n                reply.view('publish', {payload:{}});\r\n            }\r\n        }\r\n    });\r\n    server.route({\r\n        method: 'POST',\r\n        path: '/publish_new',\r\n        config: {\r\n            handler: function (request, reply) {\r\n                reply.view('publish_new', request.playload);\r\n            },\r\n            validate: {\r\n                payload: {\r\n                    title:Joi.string().required(),\r\n                    content:Joi.string().required(),\r\n                    published:Joi.string().required()\r\n                },\r\n                failAction: function (request, reply, source, error) {\r\n                   console.log(\"request i18n\", request.i18n). // DISPLAY \"request i18n null\"\r\n                    reply.view('publish', {payload:request.payload, error: error})\r\n                }\r\n            }\r\n        }\r\n   });"}}