Skip to content

Commit

Permalink
fix: replace raise error
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent.PAUWELS committed Sep 12, 2024
1 parent a48fa2c commit fed6714
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dbt/adapters/glue/gluedbapi/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ def _connect(self) -> None:
except WaiterError as we:
# If it comes here, creation failed, do not re-try (loop)
logger.exception(f'Connect failed to setup a session for {self.session_id}')
raise dbterrors.FailedToConnectError(str(we))
raise FailedToConnectError(str(we))
except Exception as e:
# If it comes here, creation failed, do not re-try (loop)
logger.exception(f'Error during connect for session {self.session_id}')
raise dbterrors.FailedToConnectError(str(e))
raise FailedToConnectError(str(e))

def _create_session(
self,
Expand Down Expand Up @@ -228,7 +228,7 @@ def _init_session(self):
statement.execute()
except Exception as e:
logger.error(f"Error in GlueCursor (session_id={self.session_id}, SQLPROXY) execute: {e}")
raise dbterrors.ExecutableError(str(e))
raise ExecutableError(str(e))

statement = GlueStatement(client=self.client, session_id=self.session_id,
code=f"spark.sql('use {self.credentials.database}')")
Expand All @@ -237,7 +237,7 @@ def _init_session(self):
statement.execute()
except Exception as e:
logger.error(f"Error in GlueCursor (session_id={self.session_id}, SQLPROXY) execute: {e}")
raise dbterrors.ExecutableError(str(e))
raise ExecutableError(str(e))

@property
def session_id(self):
Expand Down

0 comments on commit fed6714

Please sign in to comment.