dybyte commented on code in PR #10335:
URL: https://github.com/apache/seatunnel/pull/10335#discussion_r2777500407


##########
seatunnel-connectors-v2/connector-kafka/src/main/java/org/apache/seatunnel/connectors/seatunnel/kafka/sink/KafkaSinkWriter.java:
##########
@@ -184,6 +185,12 @@ private SeaTunnelRowSerializer<byte[], byte[]> 
getSerializer(
         MessageFormat messageFormat = pluginConfig.get(FORMAT);
         String topic = pluginConfig.get(TOPIC);
         if (MessageFormat.NATIVE.equals(messageFormat)) {
+            // Validate that kafka_headers_fields is not configured for NATIVE 
format
+            if (pluginConfig.get(KAFKA_HEADERS_FIELDS) != null) {
+                throw new KafkaConnectorException(
+                        CommonErrorCodeDeprecated.ILLEGAL_ARGUMENT,

Review Comment:
   ```suggestion
                           CommonErrorCode.OPERATION_NOT_SUPPORTED,
   ```
   I missed this part earlier. It would be great if we could also use 
`CommonErrorCode` here.



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

Reply via email to