File tree Expand file tree Collapse file tree 1 file changed +21
-11
lines changed
Expand file tree Collapse file tree 1 file changed +21
-11
lines changed Original file line number Diff line number Diff line change @@ -252,17 +252,27 @@ def read(self) -> Optional[OAuthToken]:
252252 self .client_telemetry_enabled and self .server_telemetry_enabled
253253 )
254254
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 ()
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 = self .session .port ,
274+ )
275+ raise e
266276
267277 self .use_inline_params = self ._set_use_inline_params_with_warning (
268278 kwargs .get ("use_inline_params" , False )
You can’t perform that action at this time.
0 commit comments