Fixes #4739: Better display of exceptions when the response format is set as "raw" format