Skip to content

unique_violation

This entry already exists.

UniqueViolationError is raised when a write breaks an app-declared unique index, such as a duplicate email on a user or a duplicate (tenantId, slug) on an article. details carries the entityName and, when the database reported it, the physical constraintName. Map that name to a friendly field in your own error handler.

It differs from version_conflict, which means two writers raced on the same stream. Retry with different data.