imply-cheddar commented on code in PR #14531:
URL: https://github.com/apache/druid/pull/14531#discussion_r1255018567


##########
sql/src/main/java/org/apache/druid/sql/calcite/external/ExternalOperatorConversion.java:
##########
@@ -120,7 +121,9 @@ public ExternalTableSpec apply(
         );
       }
       catch (JsonProcessingException e) {
-        throw new RuntimeException(e);
+        throw DruidException.forPersona(DruidException.Persona.USER)
+                            .ofCategory(DruidException.Category.INVALID_INPUT)
+                            .build(e, e.getMessage());

Review Comment:
   For this one specifically, just so you know, there is an 
`InvalidInput.exception()` that you can use.  This makes it part of the 
`"invalidInput"` group of exceptions instead of the `"general"` group of 
exceptions.



-- 
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]

Reply via email to