ensure that render errors are communicated to the client
refactored context.out to context.$out