Avoid 406 Not Acceptable for error pages
Prior to this commit, the `ErrorController` would override the original error response status if the error map cannot be written due to content negotiation with the HTTP client. In that case, the error handling infrastructure returns a `406 Not Acceptable` response. This commit improves the `ErrorController` so that `HttpMediaTypeNotAcceptableException` instances thrown by that controller are not returned as is but instead we write the error response with an empty body and the original HTTP error status. Fixes gh-19545 See gh-19522pull/19690/head
parent
6a7e3c55b8
commit
2f78c72f92
Loading…
Reference in New Issue