C0urante edited a comment on pull request #11333:
URL: https://github.com/apache/kafka/pull/11333#issuecomment-924133203


   Thanks @lhunyady. I wonder if instead of throwing an exception we can add an 
error message to the offending config properties? This would allow other 
configuration errors to be surfaced immediately in calls to `PUT 
/connector-plugins/{connectorClass}/config/validate` instead of requiring users 
to issue a follow-up request, and would return a more standard request type 
than the 500 that I believe would be returned in response to an uncaught 
exception.
   
   If this approach is desirable, we could implement it with an additional step 
in 
[`AbstractHerder::validateConnectorConfig`](https://github.com/apache/kafka/blob/f650a14d56c0cc33263c29d8d242760406943c5b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java#L418)
 that uses 
[`ConfigValue::addErrorMessage`](https://kafka.apache.org/28/javadoc/org/apache/kafka/common/config/ConfigValue.html#addErrorMessage(java.lang.String))
 to report to the user that literal `null` values are not permitted in 
connector configurations, after adding a new `ConfigValue` for the offending 
property if one isn't already defined by the connector, the Connect framework, 
etc.
   
   Thoughts?


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