I an working on running a few Rails applications through Varnish to provide better caching support which will hopefully be more flexible then the build in page-cache options in rails.
One issue I have stumbled upon is that when a HTTP/50x error is returned from the application server varnish does not serve up the custom error page (e.g. when the rails app raises an exception we render a custom error HTML template) - instead of seeing the 'nice' user friendly error page we see the following text:
Error 503 Service Unavailable Service Unavailable Guru Meditation: XID: 828451354 Varnish cache server
Is there any way to possibly pass the fetched HTML from the backend server to the client? Is it as easy as implementing the sub_error VCL method and using a fetch or pass directive?