ensureUnique

context(_: Raise<Issue>)
inline fun <T> ensureUnique(block: () -> T): T

Executes the given block and catches ExposedSQLException to handle unique constraint violations.

If a unique constraint violation is detected (SQLState starts with "23"), it raises UserIssue.AlreadyExists.