ashb commented on code in PR #27540:
URL: https://github.com/apache/airflow/pull/27540#discussion_r1025100348


##########
airflow/models/xcom.py:
##########
@@ -620,32 +621,41 @@ def serialize_value(
         if conf.getboolean("core", "enable_xcom_pickling"):
             return pickle.dumps(value)
         try:
-            return json.dumps(value).encode("UTF-8")
-        except (ValueError, TypeError):
+            return json.dumps(value, cls=XComEncoder).encode("UTF-8")
+        except (ValueError, TypeError) as ex:
             log.error(
-                "Could not serialize the XCom value into JSON."
+                f"{ex}."

Review Comment:
   ```
         - id: check-lazy-logging
           name: Check that all logging methods are lazy
           entry: ./scripts/ci/pre_commit/pre_commit_check_lazy_logging.py
   ```



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