suiting-young commented on a change in pull request #14823:
URL: https://github.com/apache/airflow/pull/14823#discussion_r594960662
##########
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:
That's why I say "may lead to misread".
`logging.exception` is **NOT** going to log the `e` object you provided,
but log the the `msg` (_`str(e)` here_), then fetch the trace (_as
instructed by `exc_info`_) from the stack.
I learnt this recently... LoL
----------------------------------------------------------------
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:
[email protected]