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/01/10 13:50:23 UTC

[GitHub] [airflow] malthe commented on a change in pull request #20727: Travix : Exception improvement on connection pagination.

malthe commented on a change in pull request #20727:
URL: https://github.com/apache/airflow/pull/20727#discussion_r781206976



##########
File path: airflow/models/connection.py
##########
@@ -233,7 +233,14 @@ def get_password(self) -> Optional[str]:
                     f"Can't decrypt encrypted password for login={self.login}  "
                     f"FERNET_KEY configuration is missing"
                 )
-            return fernet.decrypt(bytes(self._password, 'utf-8')).decode()
+            try:
+                decrypted_password = fernet.decrypt(bytes(self._password, 'utf-8')).decode()
+                return decrypted_password
+            except Exception as e:
+                log.exception(str(e))
+                raise AirflowException(

Review comment:
       @ashb but in this case, there is a stack trace being emitted via `log.exception` – so this is really a case _for_ suppressing the stack trace.




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