rawwar commented on code in PR #39295:
URL: https://github.com/apache/airflow/pull/39295#discussion_r1597539214
##########
airflow/providers/databricks/operators/databricks.py:
##########
@@ -1056,13 +1073,24 @@ def monitor_databricks_job(self) -> None:
)
if not run_state.is_successful:
raise AirflowException(
- "Task failed. Final state %s. Reason: %s",
- run_state.result_state,
- run_state.state_message,
+ f"Task failed. Final state {run_state.result_state}. Reason:
{run_state.state_message}"
Review Comment:
@pankajkoti , I updated this exception call. The reason is that
AirflowException doesn't actually just extend the Base Exception class. Hence,
all the extra arguments we send are not actually used to parse the final
exception message.
example:
```
>>> from airflow.exceptions import AirflowException
>>> raise AirflowException("This is %s", "Hello")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
airflow.exceptions.AirflowException: ('This is %s', 'Hello')
```
--
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]