We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5907eb6 commit 9d37096Copy full SHA for 9d37096
databricks/sdk/config.py
@@ -208,10 +208,8 @@ def oauth_token(self) -> Token:
208
the existing provider. Otherwise, it raises a ValueError indicating that
209
OAuth tokens are not available for the current authentication method.
210
"""
211
- # Check if the current header factory is an OAuthCredentialsProvider
212
if isinstance(self._header_factory, OAuthCredentialsProvider):
213
return self._header_factory.oauth_token()
214
- # Raise an error for non-OAuth authentication methods
215
raise ValueError(
216
f"OAuth tokens are not available for {self.auth_type} authentication. "
217
f"Use an OAuth-based authentication method to access OAuth tokens."
0 commit comments