2727 BackendType ,
2828 ExecuteResponse ,
2929)
30- from databricks .sql .exc import DatabaseError , ProgrammingError , ServerOperationError
30+ from databricks .sql .exc import DatabaseError , ServerOperationError
3131from databricks .sql .backend .sea .utils .http_client import SeaHttpClient
3232from databricks .sql .types import SSLOptions
3333
@@ -150,7 +150,7 @@ def _extract_warehouse_id(self, http_path: str) -> str:
150150 The extracted warehouse ID
151151
152152 Raises:
153- ProgrammingError : If the warehouse ID cannot be extracted from the path
153+ ValueError : If the warehouse ID cannot be extracted from the path
154154 """
155155
156156 warehouse_pattern = re .compile (r".*/warehouses/(.+)" )
@@ -174,7 +174,7 @@ def _extract_warehouse_id(self, http_path: str) -> str:
174174 f"Note: SEA only works for warehouses."
175175 )
176176 logger .error (error_message )
177- raise ProgrammingError (error_message )
177+ raise ValueError (error_message )
178178
179179 @property
180180 def max_download_threads (self ) -> int :
@@ -246,7 +246,7 @@ def close_session(self, session_id: SessionId) -> None:
246246 session_id: The session identifier returned by open_session()
247247
248248 Raises:
249- ProgrammingError : If the session ID is invalid
249+ ValueError : If the session ID is invalid
250250 OperationalError: If there's an error closing the session
251251 """
252252
@@ -503,7 +503,7 @@ def cancel_command(self, command_id: CommandId) -> None:
503503 command_id: Command identifier to cancel
504504
505505 Raises:
506- ProgrammingError : If the command ID is invalid
506+ ValueError : If the command ID is invalid
507507 """
508508
509509 if command_id .backend_type != BackendType .SEA :
@@ -528,7 +528,7 @@ def close_command(self, command_id: CommandId) -> None:
528528 command_id: Command identifier to close
529529
530530 Raises:
531- ProgrammingError : If the command ID is invalid
531+ ValueError : If the command ID is invalid
532532 """
533533
534534 if command_id .backend_type != BackendType .SEA :
@@ -593,7 +593,7 @@ def get_execution_result(
593593 SeaResultSet: A SeaResultSet instance with the execution results
594594
595595 Raises:
596- ProgrammingError : If the command ID is invalid
596+ ValueError : If the command ID is invalid
597597 """
598598
599599 if command_id .backend_type != BackendType .SEA :
0 commit comments