Lee-W commented on code in PR #46424:
URL: https://github.com/apache/airflow/pull/46424#discussion_r1961159789


##########
providers/src/airflow/providers/databricks/operators/databricks.py:
##########
@@ -207,6 +207,12 @@ def 
_handle_deferrable_databricks_operator_execution(operator, hook, log, contex
         else:
             if run_state.is_successful:
                 log.info("%s completed successfully.", operator.task_id)
+            else:
+                error_message = (
+                    f"{operator.task_id} failed with terminal state: 
{run_state} "
+                    f"and with the error {run_state.state_message}"
+                )
+                raise AirflowException(error_message)

Review Comment:
   I'm not sure whether we should use `AirflowExecption` here 🤔 (it's a vague 
exception) , but if we want to change it, we probably will need to change the 
one in _handle_databricks_operator_execution as well.



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