fix: handle email uniqueness conflict during SaaS user provisioning #19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/db-error"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The upsert used ON CONFLICT (id) but failed when a different user_id
tried to insert an email already belonging to another user, violating
the users_email_key constraint. Now retries with a unique fallback
email ({user_id}@saas.local) if the initial insert fails.
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com