solidusjs / solidus

A simple server that generates pages from JSON and Templates
MIT License
28 stars 7 forks source link

Render complex error page properly #146

Closed joanniclaborde closed 7 years ago

joanniclaborde commented 7 years ago

The special error.hbs file will most likely use a site's complex layout, which could expect to have all the fancy features that other pages have, like a full context, helpers, etc.

This PR fully renders the error page like any other page, instead of just rendering the template with an empty context.

Side effect: each error render is logged, but that only happens in dev...

[2016-10-12T16:05:57.915Z] 1 /error resources fetched in 0ms
[2016-10-12T16:05:58.218Z] 1 /error preprocessed in 303ms
[2016-10-12T16:05:58.218Z] 1 /error [404] served in 306ms
localjo commented 7 years ago

Looks good to me. Seems reasonable that the error renders should be logged. The log entries on startup when docker-solidus pings /dummy are an issue that could be addressed in docker-solidus, but it's probably not urgent. 👍