fix
This commit is contained in:
parent
53011b67ae
commit
103a872be2
2 changed files with 3 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue