urbandan commented on code in PR #13813: URL: https://github.com/apache/kafka/pull/13813#discussion_r1219366831
########## 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 agree. I was tempted to just remove the list of connectors as a whole, but there are other call sites where the exception message is logged. In case it can be useful for diagnostics, I added a parameter instead. -- 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