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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to