mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-04 00:55:59 +08:00
error
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"OpenIM/pkg/common/constant"
|
||||
"OpenIM/pkg/common/db/table/relation"
|
||||
"OpenIM/pkg/common/db/tx"
|
||||
"OpenIM/pkg/errs"
|
||||
"OpenIM/pkg/utils"
|
||||
"context"
|
||||
"errors"
|
||||
@@ -235,7 +236,7 @@ func (f *friendDatabase) FindFriendsWithError(ctx context.Context, ownerUserID s
|
||||
return
|
||||
}
|
||||
if len(friends) != len(friendUserIDs) {
|
||||
err = constant.ErrRecordNotFound.Wrap()
|
||||
err = errs.ErrRecordNotFound.Wrap()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package controller
|
||||
import (
|
||||
"OpenIM/pkg/common/constant"
|
||||
"OpenIM/pkg/common/db/table/relation"
|
||||
"OpenIM/pkg/errs"
|
||||
"OpenIM/pkg/utils"
|
||||
"context"
|
||||
)
|
||||
@@ -60,7 +61,7 @@ func (u *userDatabase) FindWithError(ctx context.Context, userIDs []string) (use
|
||||
return
|
||||
}
|
||||
if len(users) != len(userIDs) {
|
||||
err = constant.ErrRecordNotFound.Wrap()
|
||||
err = errs.ErrRecordNotFound.Wrap()
|
||||
}
|
||||
return
|
||||
}
|
||||
@@ -114,7 +115,7 @@ func (u *userDatabase) GetAllUserID(ctx context.Context) (userIDs []string, err
|
||||
if total == int64(len(userIDs)) {
|
||||
return userIDs, nil
|
||||
}
|
||||
return nil, constant.ErrData.Wrap("The total number of results and expectations are different, but result is nil")
|
||||
return nil, errs.ErrData.Wrap("The total number of results and expectations are different, but result is nil")
|
||||
}
|
||||
userIDs = append(userIDs, tmp...)
|
||||
pageNumber++
|
||||
|
||||
Reference in New Issue
Block a user