amoghrajesh commented on code in PR #69238:
URL: https://github.com/apache/airflow/pull/69238#discussion_r3527154630


##########
providers/databricks/tests/unit/databricks/hooks/test_databricks_base.py:
##########
@@ -238,7 +238,7 @@ def test_get_sp_token_retry_error(self, mock_post):
         hook.user_agent_header = {"User-Agent": "test-agent"}
         resource = ""
 
-        with pytest.raises(AirflowException, match="API requests to Databricks 
failed 2 times. Giving up."):
+        with pytest.raises(AirflowException, match="API requests to Databricks 
failed 2 times"):

Review Comment:
   Handled in [handling comments from 
wei](https://github.com/apache/airflow/pull/69238/commits/1023cff5d6f28a729a0e64ed4f4408cf5570a024)



##########
providers/databricks/src/airflow/providers/databricks/hooks/databricks_base.py:
##########
@@ -325,8 +325,11 @@ def _get_sp_token(self, resource: str) -> str:
                     self._is_oauth_token_valid(jsn)
                     self.oauth_tokens[resource] = jsn
                     break
-        except RetryError:
-            raise AirflowException(f"API requests to Databricks failed 
{self.retry_limit} times. Giving up.")
+        except RetryError as e:
+            raise AirflowException(
+                f"API requests to Databricks failed {self.retry_limit} times "
+                f"(last error: {e.last_attempt.exception()}). Giving up."
+            )

Review Comment:
   Handled in [handling comments from 
wei](https://github.com/apache/airflow/pull/69238/commits/1023cff5d6f28a729a0e64ed4f4408cf5570a024)



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