felipearcaro-buildium commented on issue #63930:
URL: https://github.com/apache/airflow/issues/63930#issuecomment-4097710526

   @eladkal I understand your point, but the current behavior still seems 
semantically wrong to me - we either don't see logs, or we get an XCom 
(`do_xcom_push=True`) with the following information: `[{'success': False, 
'created': False, 'id': None, 'errors': [{'statusCode': 'INVALID_FIELD', 
'message': "Unexpected JsonMappingException: No such column 'Wrong_Asset_Key' 
on sobject of type Asset", 'fields': []}]}]` but the task still succeeds.
   
   I already have a suggested fix in place that would (at least) log something 
like this:
   ```
   [2026-03-20, 09:34:33 -03] {custom_salesforce_bulk_operator.py:42} INFO - 
Salesforce Bulk API operation completed: 0/1 successful
   [2026-03-20, 09:34:33 -03] {custom_salesforce_bulk_operator.py:51} INFO - 
Salesforce Bulk API operation failed for 1 records:
     - {'success': False, 'created': False, 'id': None, 'errors': 
[{'statusCode': 'INVALID_FIELD', 'message': "Unexpected JsonMappingException: 
No such column 'Wrong_Asset_Key' on sobject of type Asset", 'fields': []}]}
   ```
   
   What do you think?
   
   I agree that raising an `AirflowException` is debatable, considering that's 
a design choice in the simple_salesforce library, though.
   
   
   


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