diff --git a/python/ray/tests/test_actor.py b/python/ray/tests/test_actor.py index 1aafcd04f..cc252d24d 100644 --- a/python/ray/tests/test_actor.py +++ b/python/ray/tests/test_actor.py @@ -855,6 +855,11 @@ def test_inherit_actor_from_class(ray_start_regular_shared): assert ray.get(actor.g.remote(5)) == 6 +def test_get_non_existing_named_actor(ray_start_regular_shared): + with pytest.raises(ValueError): + _ = ray.get_actor("non_existing_actor") + + @pytest.mark.skip( "This test is just used to print the latency of creating 100 actors.") def test_actor_creation_latency(ray_start_regular_shared): diff --git a/python/ray/util/client/server/server.py b/python/ray/util/client/server/server.py index 8ef8c963f..cf095a137 100644 --- a/python/ray/util/client/server/server.py +++ b/python/ray/util/client/server/server.py @@ -261,8 +261,7 @@ class RayletServicer(ray_client_pb2_grpc.RayletDriverServicer): result.valid = True return result except Exception as e: - logger.error(f"Caught schedule exception {e}") - raise e + logger.debug(f"Caught schedule exception, returning: {e}") return ray_client_pb2.ClientTaskTicket( valid=False, error=cloudpickle.dumps(e))