Skip to content

Commit

Permalink
Update library
Browse files Browse the repository at this point in the history
Signed-off-by: Marcelo Henrique Neppel <[email protected]>
  • Loading branch information
marceloneppel committed Jul 5, 2024
1 parent 012da52 commit 2e0dbeb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/charms/postgresql_k8s/v0/postgresql.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ class PostgreSQLEnableDisableExtensionError(Exception):
"""Exception raised when enabling/disabling an extension fails."""


class PostgreSQLGetLastArchivedWALError(Exception):
"""Exception raised when retrieving last archived WAL fails."""


class PostgreSQLGetPostgreSQLVersionError(Exception):
"""Exception raised when retrieving PostgreSQL version fails."""

Expand Down Expand Up @@ -391,7 +395,7 @@ def get_last_archived_wal(self) -> str:
return cursor.fetchone()[0]
except psycopg2.Error as e:
logger.error(f"Failed to get PostgreSQL last archived WAL: {e}")
raise PostgreSQLGetPostgreSQLVersionError()
raise PostgreSQLGetLastArchivedWALError()

def get_postgresql_text_search_configs(self) -> Set[str]:
"""Returns the PostgreSQL available text search configs.
Expand Down

0 comments on commit 2e0dbeb

Please sign in to comment.