Skip to content

Commit 8d3a3cd

Browse files
committed
Don't swallow duplicate key errror on phone update
1 parent 7638b92 commit 8d3a3cd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

api/pkg/repositories/gorm_phone_repository.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func (repository *gormPhoneRepository) Save(ctx context.Context, phone *entities
8181
WithContext(ctx).
8282
Save(phone).
8383
Error
84-
if err != nil && !errors.Is(err, gorm.ErrDuplicatedKey) {
84+
if err != nil {
8585
msg := fmt.Sprintf("cannot save phone with ID [%s]", phone.ID)
8686
return repository.tracer.WrapErrorSpan(span, stacktrace.Propagate(err, msg))
8787
}

0 commit comments

Comments
 (0)