Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 300822

“Uncaught exception” page contains HTML but has content-type text/plain

$
0
0

When there is an uncaught exception, Drupal 8 displays a simple dump of the exception.

Although the page is served as 'Content-Type' = 'text/plain', it contains HTML. It looks better to me when I change the code (in FinalExceptionSubscriber.php) to serve as 'text/html'. See attached images.

Setting to "Minor" as the message would never be shown in production. Nevertheless, when debugging it's tedious to try to read text that contains HTML tags.

I asked for help on Drupal Answers. @4k4 suggested that the problem was potentially related to #2853300: Standardize fatal error/exception handling: backtrace for all formats, not just HTML, and that the "obvious" fix of changing the content-type would revert that issue.


Viewing all articles
Browse latest Browse all 300822

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>