mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-01 15:18:59 +08:00
err
This commit is contained in:
parent
1921e5b030
commit
befd5c8636
@ -74,7 +74,8 @@ func (f *friendDatabase) AddFriendRequest(ctx context.Context, fromUserID, toUse
|
|||||||
return f.tx.Transaction(func(tx any) error {
|
return f.tx.Transaction(func(tx any) error {
|
||||||
_, err := f.friendRequest.NewTx(tx).Take(ctx, fromUserID, toUserID)
|
_, err := f.friendRequest.NewTx(tx).Take(ctx, fromUserID, toUserID)
|
||||||
//有db错误
|
//有db错误
|
||||||
if err != nil && errors.Unwrap(err) != gorm.ErrRecordNotFound {
|
if err != nil && errs.Unwrap(err) != gorm.ErrRecordNotFound {
|
||||||
|
// errors.Unwrap()
|
||||||
log.ZDebug(ctx, "AddFriendRequest err", "bool", errors.Unwrap(err) != gorm.ErrRecordNotFound, "err", err.Error(), "unwrap", errors.Unwrap(err).Error())
|
log.ZDebug(ctx, "AddFriendRequest err", "bool", errors.Unwrap(err) != gorm.ErrRecordNotFound, "err", err.Error(), "unwrap", errors.Unwrap(err).Error())
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user