diff --git a/error_translator.go b/error_translator.go index f57db07..5f81350 100644 --- a/error_translator.go +++ b/error_translator.go @@ -8,6 +8,7 @@ import ( "github.com/jackc/pgx/v5/pgconn" ) +// The error codes to map PostgreSQL errors to gorm errors, here is the PostgreSQL error codes reference https://www.postgresql.org/docs/current/errcodes-appendix.html. var errCodes = map[string]error{ "23505": gorm.ErrDuplicatedKey, "23503": gorm.ErrForeignKeyViolated,