Skip to content

Commit 4c219da

Browse files
committed
retry errors
Signed-off-by: Sai Shree Pradhan <saishree.pradhan@databricks.com>
1 parent 0b7686c commit 4c219da

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/databricks/sql/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
AuthenticationError,
2525
ConnectionError,
2626
)
27+
from urllib3.exceptions import MaxRetryError
2728
from databricks.sql.thrift_api.TCLIService import ttypes
2829
from databricks.sql.thrift_backend import ThriftBackend
2930
from databricks.sql.utils import (
@@ -307,6 +308,8 @@ def read(self) -> Optional[OAuthToken]:
307308
self._open_session_resp = self.thrift_backend.open_session(
308309
session_configuration, catalog, schema
309310
)
311+
except (RequestError, MaxRetryError) as e:
312+
raise
310313
except Exception as e:
311314
raise ConnectionError(
312315
message=f"Failed to establish connection: {str(e)}",

0 commit comments

Comments
 (0)