Issues such as T285875 are difficult to investigate. It's hard to identify the source of responses when we add a custom error page in Varnish if the origin server returned an error (4xx or 5xx does not matter) with no response body. Those responses are indistinguishable from Varnish errors.
We should preserve the value of the Server response header in this sort of situation if possible, or add another header (eg: X-Original-Sever) otherwise.