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 2021/03/16 08:35:13 UTC

[GitHub] [airflow] XD-DENG commented on a change in pull request #14823: `logging.exception` redundancy.

XD-DENG commented on a change in pull request #14823:
URL: https://github.com/apache/airflow/pull/14823#discussion_r594954135



##########
File path: airflow/models/connection.py
##########
@@ -333,9 +333,8 @@ def extra_dejson(self) -> Dict:
         if self.extra:
             try:
                 obj = json.loads(self.extra)
-            except JSONDecodeError as e:
-                self.log.exception(e)
-                self.log.error("Failed parsing the json for conn_id %s", self.conn_id)
+            except JSONDecodeError:

Review comment:
       This change is not making sense to me. 
   
   `self.log.exception(e)` has its purpose here: to add Exception info/trackback into logs.
   
   Or to add `exc_info` properly in necessary manner.
   
   Overall, personally I find more clean-ups are needed in this PR.




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

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