When there is an uncaught exception, Drupal 8 displays a simple dump of the exception.
I find that the page is served as 'Content-Type' = 'text/plain', yet it contains HTML:
It looks better to me when I change the code to serve as 'text/html':
I already found the code to change - it's in FinalExceptionSubscriber.php, which outputs
</br></br>
- SafeMarkup::format(...) which is documented as
Formats a string for HTML display by replacing variable placeholders.
My question is:
- Does anyone know a reason why the error page is text/plain given that it contains HTML.
- Shall I raise an issue and patch?