@@ -251,7 +251,7 @@ def close_session(self, session_id: SessionId) -> None:
251251 logger .debug ("SeaDatabricksClient.close_session(session_id=%s)" , session_id )
252252
253253 if session_id .backend_type != BackendType .SEA :
254- raise ProgrammingError ("Not a valid SEA session ID" )
254+ raise ValueError ("Not a valid SEA session ID" )
255255 sea_session_id = session_id .to_sea_session_id ()
256256
257257 request_data = DeleteSessionRequest (
@@ -426,7 +426,7 @@ def execute_command(
426426 """
427427
428428 if session_id .backend_type != BackendType .SEA :
429- raise ProgrammingError ("Not a valid SEA session ID" )
429+ raise ValueError ("Not a valid SEA session ID" )
430430
431431 sea_session_id = session_id .to_sea_session_id ()
432432
@@ -505,11 +505,11 @@ def cancel_command(self, command_id: CommandId) -> None:
505505 """
506506
507507 if command_id .backend_type != BackendType .SEA :
508- raise ProgrammingError ("Not a valid SEA command ID" )
508+ raise ValueError ("Not a valid SEA command ID" )
509509
510510 sea_statement_id = command_id .to_sea_statement_id ()
511511 if sea_statement_id is None :
512- raise ProgrammingError ("Not a valid SEA command ID" )
512+ raise ValueError ("Not a valid SEA command ID" )
513513
514514 request = CancelStatementRequest (statement_id = sea_statement_id )
515515 self .http_client ._make_request (
@@ -530,11 +530,11 @@ def close_command(self, command_id: CommandId) -> None:
530530 """
531531
532532 if command_id .backend_type != BackendType .SEA :
533- raise ProgrammingError ("Not a valid SEA command ID" )
533+ raise ValueError ("Not a valid SEA command ID" )
534534
535535 sea_statement_id = command_id .to_sea_statement_id ()
536536 if sea_statement_id is None :
537- raise ProgrammingError ("Not a valid SEA command ID" )
537+ raise ValueError ("Not a valid SEA command ID" )
538538
539539 request = CloseStatementRequest (statement_id = sea_statement_id )
540540 self .http_client ._make_request (
@@ -562,7 +562,7 @@ def get_query_state(self, command_id: CommandId) -> CommandState:
562562
563563 sea_statement_id = command_id .to_sea_statement_id ()
564564 if sea_statement_id is None :
565- raise ProgrammingError ("Not a valid SEA command ID" )
565+ raise ValueError ("Not a valid SEA command ID" )
566566
567567 request = GetStatementRequest (statement_id = sea_statement_id )
568568 response_data = self .http_client ._make_request (
@@ -595,11 +595,11 @@ def get_execution_result(
595595 """
596596
597597 if command_id .backend_type != BackendType .SEA :
598- raise ProgrammingError ("Not a valid SEA command ID" )
598+ raise ValueError ("Not a valid SEA command ID" )
599599
600600 sea_statement_id = command_id .to_sea_statement_id ()
601601 if sea_statement_id is None :
602- raise ProgrammingError ("Not a valid SEA command ID" )
602+ raise ValueError ("Not a valid SEA command ID" )
603603
604604 # Create the request model
605605 request = GetStatementRequest (statement_id = sea_statement_id )
0 commit comments