Skip to main content

Module error

Module error 

Source
Expand description

A Postgres failure as a guest receives it: the structured DbError of db_call, and the text of the legacy calls.

Functions§

from_pg
The server’s error fields when Postgres reported one; otherwise the failure is the connection’s (closed socket, I/O, protocol).
server_message
tokio_postgres::Error renders as the bare string “db error”: what is worth reading (the constraint name, the syntax error, the detail line) hangs off its source, which is what the legacy calls hand a guest.