Replace repository.ErrUserNotFound with service.UserErrNonexistent

This commit is contained in:
Denis Arh
2020-05-26 18:44:05 +02:00
parent 10d9dbfcbb
commit 2597029164
+4
View File
@@ -238,6 +238,10 @@ func (svc user) FindByAny(identifier interface{}) (u *types.User, err error) {
func (svc user) proc(u *types.User, err error) (*types.User, error) {
if err != nil {
if repository.ErrUserNotFound.Eq(err) {
return nil, UserErrNonexistent()
}
return nil, err
}