mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-06 06:51:29 +02:00
change grpc code to permission denied
This commit is contained in:
@@ -345,7 +345,7 @@ func mapError(ctx context.Context, err error) error {
|
||||
}
|
||||
}
|
||||
if errors.Is(err, internalStatus.ErrPeerAlreadyLoggedIn) {
|
||||
return status.Error(codes.AlreadyExists, internalStatus.ErrPeerAlreadyLoggedIn.Error())
|
||||
return status.Error(codes.PermissionDenied, internalStatus.ErrPeerAlreadyLoggedIn.Error())
|
||||
}
|
||||
log.WithContext(ctx).Errorf("got an unhandled error: %s", err)
|
||||
return status.Errorf(codes.Internal, "failed handling request")
|
||||
|
||||
Reference in New Issue
Block a user