Expand description
Application error type and HTTP mapping.
Enums§
- Error
- Top-level error for the web service. Wraps the various library and IO
errors so that handlers can use
?and the centralIntoResponseimpl turns them into HTTP responses.
Functions§
- is_
fk_ violation - Returns
truewhen the given sqlx error wraps a SQLite foreign-key constraint violation. SQLite reports these as either extended code 787 (SQLITE_CONSTRAINT_FOREIGNKEY) or, for deferred / trigger-mediated failures, 1811 (SQLITE_CONSTRAINT_TRIGGER). To be robust across both we also fall back to a substring check of the error message.