You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/08/02 09:51:23 UTC

[GitHub] [airflow] potiuk commented on a diff in pull request #24933: Apply flake8-logging-format changes to providers

potiuk commented on code in PR #24933:
URL: https://github.com/apache/airflow/pull/24933#discussion_r935349386


##########
airflow/providers/alibaba/cloud/hooks/oss.py:
##########
@@ -221,8 +221,8 @@ def delete_object(
         try:
             self.get_bucket(bucket_name).delete_object(key)
         except Exception as e:
-            self.log.error(e)
-            raise AirflowException(f"Errors when deleting: {key}")
+            self.log.error("Errors when deleting %s", key)
+            raise AirflowException(e)

Review Comment:
   Agree :). We used to use that pattern in the past but unless you use dedicated AirflowSkip or AirflowFailException it's better to raise the original exception 



-- 
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-unsubscribe@airflow.apache.org

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