Skip to content

Commit a5b500f

Browse files
committed
without try/catch block
Signed-off-by: Sai Shree Pradhan <saishree.pradhan@databricks.com>
1 parent e07aa71 commit a5b500f

File tree

1 file changed

+11
-24
lines changed

1 file changed

+11
-24
lines changed

src/databricks/sql/client.py

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -252,30 +252,17 @@ def read(self) -> Optional[OAuthToken]:
252252
self.client_telemetry_enabled and self.server_telemetry_enabled
253253
)
254254

255-
try:
256-
self.session = Session(
257-
server_hostname,
258-
http_path,
259-
http_headers,
260-
session_configuration,
261-
catalog,
262-
schema,
263-
_use_arrow_native_complex_types,
264-
**kwargs,
265-
)
266-
self.session.open()
267-
except Exception as e:
268-
TelemetryClientFactory.connection_failure_log(
269-
error_name=e.__class__.__name__,
270-
error_message=str(e),
271-
host_url=server_hostname,
272-
http_path=http_path,
273-
port=kwargs.get("_port", 443),
274-
user_agent=self.session.useragent_header
275-
if hasattr(self, "session")
276-
else None,
277-
)
278-
raise e
255+
self.session = Session(
256+
server_hostname,
257+
http_path,
258+
http_headers,
259+
session_configuration,
260+
catalog,
261+
schema,
262+
_use_arrow_native_complex_types,
263+
**kwargs,
264+
)
265+
self.session.open()
279266

280267
self.use_inline_params = self._set_use_inline_params_with_warning(
281268
kwargs.get("use_inline_params", False)

0 commit comments

Comments
 (0)