gianm commented on code in PR #18404:
URL: https://github.com/apache/druid/pull/18404#discussion_r2277243115
##########
sql/src/main/java/org/apache/druid/sql/http/SqlQuery.java:
##########
@@ -343,5 +341,8 @@ private static SqlQuery from(
catch (IOException e) {
throw new HttpException(Response.Status.BAD_REQUEST, "Unable to read
query from request: " + e.getMessage());
}
+ catch (IllegalArgumentException e) {
+ throw new HttpException(Response.Status.BAD_REQUEST, "Invalid
Content-Type header: " + e.getMessage());
Review Comment:
Not sure if this is right for this location. There's a lot going on in the
`try` block and maybe something else can throw `IllegalArgumentException` other
than an invalid content-type. Why not throw this exception directly in the
`else` block of the content-type checking conditional?
--
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]