Taragolis commented on code in PR #38804:
URL: https://github.com/apache/airflow/pull/38804#discussion_r1556428173


##########
airflow/providers/imap/hooks/imap.py:
##########
@@ -219,7 +219,7 @@ def _retrieve_mails_attachments_by_name(
         self, name: str, check_regex: bool, latest_only: bool, mail_folder: 
str, mail_filter: str
     ) -> list:
         if not self.mail_client:
-            raise Exception("The 'mail_client' should be initialized before!")
+            raise AirflowException("The 'mail_client' should be initialized 
before!")

Review Comment:
   ```suggestion
               raise RuntimeError("The 'mail_client' should be initialized 
before!")
   ```
   
   I guess RuntimeError would be fine in this case, when we expects that some 
of the values are initialised before



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