Skip to main content

Module error

Module error 

Source
Expand description

Typed errors and HTTP mapping.

Structs§

BulkFieldError
ErrorBody
ErrorDetail

Enums§

AppError
ConfigError

Functions§

db_error_field
Extract the column name from a PostgreSQL error. Extract a field name from a database constraint violation error, where available. On Postgres, this parses the detail field of PgDatabaseError (e.g. “Key (email)=… already exists”). On other dialects the function returns None — callers fall back to generic messages.
db_error_message
Build a human-readable message for a DB error, using the extracted field name when available.