gharris1727 commented on code in PR #13813:
URL: https://github.com/apache/kafka/pull/13813#discussion_r1218424942


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java:
##########
@@ -464,10 +465,22 @@ ConfigInfos validateConnectorConfig(Map<String, String> 
connectorProps, boolean
             connectorProps = 
worker.configTransformer().transform(connectorProps);
         }
         String connType = 
connectorProps.get(ConnectorConfig.CONNECTOR_CLASS_CONFIG);
-        if (connType == null)
-            throw new BadRequestException("Connector config " + connectorProps 
+ " contains no connector type");
+        if (connType == null) {
+            return createConnectorClassError("Config contains no connector 
type");
+        }
+
+        Connector connector;
+        try {
+            connector = getConnector(connType);
+        } catch (ConnectException e) {
+            return createConnectorClassError(e.getMessage());

Review Comment:
   I believe this message includes a list of suggested classes. I think that 
the recommended values is the right way to return this data, so we may choose 
to omit it from the error messages thrown on this code path.
   
   WDYT?



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to