# Errors `agensgraph.errors`. It re-exports psycopg's PEP 249 classes as the same objects. See [Errors](../../production/errors.md). ## Raised for the server ```{py:currentmodule} agensgraph.errors ``` ```{py:exception} ConfigurationError A setting refused the statement; `setting` names it. An `OperationalError`. ``` ```{py:exception} ReadOnlyGraphWrite A graph write in a read-only transaction. A `ReadOnlySqlTransaction`. ``` ```{py:exception} CapabilityError Not on this server's version; `feature`, `required`, `found`. A `NotSupportedError`. ``` ## Raised by the driver ```{py:exception} StaleLabelCache The label table cannot name a label; call `refresh_labels()`. `labid`, `graph`. ``` ```{py:exception} NoEnclosingTransaction `stream()` outside a transaction on a connection in autocommit. ``` ```{py:exception} ReleasedConnection A pooled connection used after it went back. ``` ```{py:exception} StaleGeneration A pool found no connection of its current generation. ``` ```{py:exception} BatchFailed A pipelined batch failed; `statements`, and the server's error as `__cause__`. ``` ```{py:exception} UnresolvedCommit For a caller to raise when a commit's outcome could not be settled; `transaction_id`. Classified `UNKNOWN`. ``` ## Functions ```{py:currentmodule} agensgraph ``` ```{py:function} safe_message(exc: BaseException) -> str The SQLSTATE and first line, for someone who did not send the statement. ``` ```{py:function} show_error_details(enabled: bool = True) Whether DETAIL and CONTEXT reach a failure's message, for the whole process. Off by default. ``` ```{py:function} showing_error_details() -> bool ``` ```{py:function} redact_details(exc: BaseException) -> BaseException Cut one exception's message to its first line. ``` ```{py:currentmodule} agensgraph.errors ``` ```{py:function} mask_dsn(dsn: str | None) -> str A connection string with its password hidden. ```