ashb commented on a change in pull request #10917:
URL: https://github.com/apache/airflow/pull/10917#discussion_r518713300



##########
File path: airflow/models/taskinstance.py
##########
@@ -1345,11 +1354,12 @@ def handle_failure(self, error, test_mode=None, 
context=None, force_fail=False,
         # Log failure duration
         session.add(TaskFail(task, self.execution_date, self.start_date, 
self.end_date))
 
-        if context is not None:
-            context['exception'] = error

Review comment:
       Sorry, this makes it a -1 from me. This information is vital when it's 
available and used by a number of people to send exception messages in Slack 
hooks. Without this it's much less useful
   
   We need to keep this when it is available, and either document that it's not 
available in all cases, or add a "synthetic" exception when it's missing 
(`AirflowError("state changed to failed")` for example)




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


Reply via email to