SuccessMoses commented on code in PR #44307:
URL: https://github.com/apache/airflow/pull/44307#discussion_r1856262837


##########
providers/src/airflow/providers/apache/kafka/hooks/consume.py:
##########
@@ -23,6 +23,18 @@
 from airflow.providers.apache.kafka.hooks.base import KafkaBaseHook
 
 
+class KafkaAuthenticationError(Exception):
+    """Custom exception for Kafka authentication failures."""
+
+    pass
+
+
+def error_callback(err):

Review Comment:
   Is this what you meant?
   
   ```
   def error_callback(err):
       """Handle kafka errors."""
       if err.code() == KafkaError.NO_ERROR:
           return
       else:
           print("Exception received: ", err)
           raise KafkaAuthenticationError(f"Authentication failed: {err}")
   ```



-- 
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: commits-unsubscr...@airflow.apache.org

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

Reply via email to