KoviAnusha commented on code in PR #58062:
URL: https://github.com/apache/airflow/pull/58062#discussion_r2536191648


##########
airflow-core/src/airflow/models/connection.py:
##########
@@ -339,6 +339,24 @@ def get_uri(self) -> str:
 
         return uri
 
+    def _safe_decrypt(self, fld: str) -> str:
+        """Safely decrypt and decode a field with proper error handling."""
+        from cryptography.fernet import InvalidToken
+
+        fernet = get_fernet()
+        try:
+            as_bytes = bytes(fld, "utf-8")
+        except (TypeError, UnicodeEncodeError):
+            return fld

Review Comment:
   This is suggested here 
https://github.com/apache/airflow/pull/58062#discussion_r2517648645. So I have 
implemented this.



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