This commit is contained in:
Iron_Felix 2025-12-06 09:53:02 +03:00
parent 53011b67ae
commit 103a872be2
2 changed files with 3 additions and 1 deletions

View file

@ -386,6 +386,9 @@ func (s Server) AddUserTitle(ctx context.Context, request oapi.AddUserTitleReque
// fmt.Println(pgErr.Code) // => 42601
if pgErr.Code == pgErrDuplicateKey { //duplicate key value
return oapi.AddUserTitle409Response{}, nil
} else {
log.Errorf("%v", err)
return oapi.AddUserTitle500Response{}, nil
}
} else {
log.Errorf("%v", err)