Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-3500

The ExceptionHandler sets the media type of an exception to text/html

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.0.0.Alpha3
    • None
    • Providers
    • None

      In the ExceptionHandler when the thrown exception does not include a response, the exception is used to create a response. The media type for the response is set to text/html. However, there is not a MessageBodyWriter by default for for type. Therefore the StringStarText provider ends up being used which does not write valid HTML.

      We should likely change the default response type to text/plain. The other option is to generate valid HTML as the response. However, we may want to consider formatting the output for known media types. It was concluded that we should change the response media type to text/plain.

              dkafe Dimitris Kafetzis
              jperkins-rhn James Perkins
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: