Errors#

agensgraph.errors. It re-exports psycopg’s PEP 249 classes as the same objects. See Errors.

Raised for the server#

exception agensgraph.errors.ConfigurationError#

A setting refused the statement; setting names it. An OperationalError.

exception agensgraph.errors.ReadOnlyGraphWrite#

A graph write in a read-only transaction. A ReadOnlySqlTransaction.

exception agensgraph.errors.CapabilityError#

Not on this server’s version; feature, required, found. A NotSupportedError.

Raised by the driver#

exception agensgraph.errors.StaleLabelCache#

The label table cannot name a label; call refresh_labels(). labid, graph.

exception agensgraph.errors.NoEnclosingTransaction#

stream() outside a transaction on a connection in autocommit.

exception agensgraph.errors.ReleasedConnection#

A pooled connection used after it went back.

exception agensgraph.errors.StaleGeneration#

A pool found no connection of its current generation.

exception agensgraph.errors.BatchFailed#

A pipelined batch failed; statements, and the server’s error as __cause__.

exception agensgraph.errors.UnresolvedCommit#

For a caller to raise when a commit’s outcome could not be settled; transaction_id. Classified UNKNOWN.

Functions#

agensgraph.safe_message(exc: BaseException) → str#

The SQLSTATE and first line, for someone who did not send the statement.

agensgraph.show_error_details(enabled: bool = True)#

Whether DETAIL and CONTEXT reach a failure’s message, for the whole process. Off by default.

agensgraph.showing_error_details() → bool#
agensgraph.redact_details(exc: BaseException) → BaseException#

Cut one exception’s message to its first line.

agensgraph.errors.mask_dsn(dsn: str | None) → str#

A connection string with its password hidden.