MSP-1658 /user/get_profile returning 401 for blocked users
This commit is contained in:
1 parent
0877e05811
commit
60fc5d9170
2 files changed
+3
-1
No files matched your search
@@ -58,6 +58,8 @@ func (u User) GetProfile(ctx context.Context, authData grpc.AuthData) (*domain.A
|
||||
profile, err := u.userService.GetProfileById(ctx, int64(adminId))
|
||||
|
||||
switch {
|
||||
case errors.Is(err, domain.ErrUnauthenticated):
|
||||
return nil, status.Error(codes.Unauthenticated, "user is blocked")
|
||||
case errors.Is(err, domain.ErrNotFound):
|
||||
return nil, status.Error(codes.NotFound, "user not found")
|
||||
case err != nil:
|
||||
|
||||
Reference in new issue
Block a user