Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Verify template and layout files exist in handler #10
After looking into this, it seems to me that the full rendering process should be moved to the
Currently, rendering happens right before the response is sent to the client. This means that errors and other rendering results are not available to 'onPostHandler' and 'onPreResponse' handlers. This change moves the rendering step to an earlier point in the request lifecycle to allow the results to be processed after the handler has completed. Fixes hapijs#10.
@hueniverse what if just the template compilation is done in the
Currently neither template compilation nor rendering occur until after the 'onPreResponse' event. This means that extensions have no way to intercept template related errors. This change moves the compilation step to an earlier point in the request lifecycle so that compilation errors are made available to the 'onPostHandler' and 'onPreResponse' extension points. Rendering still happens after 'onPreResponse' so that the context object can be modified by extensions all the up through the 'onPreResponse' event. Fixes hapijs#10.