This refers to the example provided in custom-error-pages.
The code should return a default content-type header text/html, but when it fails to decode the Accept header, it simply mirrors whatever came from the request into the response. Please refer to lines 108 and 114 from the original source code.
The general behavior for most browsers is to include several mime types in the Accept header. When it's unable to decode it, this default backend simply copies the contents of Accept into the response's Content-Type. This results in browsers not being able to decode the Content-Type in the response.
Examples:
Firefox sends Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 and when it receives the same string back from the server, it fails to recognize the content as a simple text/html.
A worse scenario now appears in Google Chrome, starting with version 73. It now sends this type of header Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3, which includes a new Google Chrome feature called Signed HTTP Exchanges. Upon receiving a signed exchange response header, the browser will try to validate a signature that should be included in the response content.
Users are faced with the error message: ERR_INVALID_SIGNED_EXCHANGE.

The expected behavior, in this case, is for the default backend use Content-Type: text/html when it fails to decode the Accept header.
PR is very simple and is on the way
For anyone else finding this from Google, custom-error-pages-amd64 with tag 0.4 [1] has this update.
[1] https://quay.io/repository/kubernetes-ingress-controller/custom-error-pages-amd64?tab=tags
@juliohm1978
What if an API response is JSON ?
Currently its giving 4xx.json/5xx.json and so on based upon types
Most helpful comment
For anyone else finding this from Google, custom-error-pages-amd64 with tag 0.4 [1] has this update.
[1] https://quay.io/repository/kubernetes-ingress-controller/custom-error-pages-amd64?tab=tags