maytasm commented on a change in pull request #12299:
URL: https://github.com/apache/druid/pull/12299#discussion_r819960008
##########
File path:
server/src/main/java/org/apache/druid/server/initialization/jetty/JettyServerModule.java
##########
@@ -483,6 +505,28 @@ public boolean isShowServlet()
return false;
}
+
+ @Override
+ public void generateAcceptableResponse(
+ Request baseRequest,
+ HttpServletRequest request,
+ HttpServletResponse response,
+ int code,
+ String message,
+ String contentType
+ ) throws IOException
+ {
+ if (config.isDefaultJettyErrorResponseInJson()) {
+ super.generateAcceptableResponse(baseRequest, request, response,
code, message,
+
MimeTypes.Type.APPLICATION_JSON.asString()
+ );
+ } else {
+ super.generateAcceptableResponse(baseRequest, request, response,
code, message,
Review comment:
Why are we setting to html here? If this new config is not set, we
should still depend on the Accept header to determine the response format right?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]