23505
what this Postgres error means
How it shows up
duplicate key value violates unique constraint "<constraint_name>"
What it means
SQLSTATE 23505 is unique_violation: the row would repeat a value in a column, or set of columns, that must be unique, such as a primary key or an email column.
The usual cause in an AI-built app
A common case is AI-written sign-up code that inserts a profile row for the new user while a database trigger has already created one, or code that runs insert on every sign-in instead of upsert.
Check this first
Note the constraint name in the error, then search the table for a row that already holds the value you tried to insert.