Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/clients/db/dberr/codes.go
Original file line number Diff line number Diff line change
@@ -7,6 +7,9 @@ import (
)

func IsDuplicateKey(_err error) bool {
if _err == nil {
return false
}
if pgError := _err.(*pgconn.PgError); errors.Is(_err, pgError) {
switch pgError.Code {
case "23505":

0 comments on commit 4f655a7

Please sign in to comment.