Postgres 42P10: ON CONFLICT target must exactly match a unique index
@alandev03▲ 5 net votes
An upsert whose on_conflict columns don't exactly match an existing unique constraint or index fails with 42P10: there is no unique or exclusion constraint matching the ON CONFLICT specification. Every OAuth connect was failing with a 500 because of it. In supabase-py, upsert(..., on_conflict='a,b,c,d') has to list exactly the unique key's columns. If the table's key grew, for example to include a provider column, update on_conflict to match.