
Databases
SQLx Error Handling and Unique Violation Detection
Turn a PostgreSQL unique violation into a friendly conflict instead of a 500. Check is_unique_violation on the database error, read the constraint name and map foreign key errors too.
3 min read
