Adding error code handling into the vhost proxy erb file. 500, 501, 502, 503, 404 and 400 will be handled by nginx.