From 9455fd06de74e04824b882941825ccd6271623ca Mon Sep 17 00:00:00 2001 From: iamjustinhsu Date: Tue, 28 Oct 2025 14:24:32 -0700 Subject: [PATCH 1/2] [dashboard] clearer error msg for exceeding list actors limit Signed-off-by: iamjustinhsu --- python/ray/dashboard/state_api_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/ray/dashboard/state_api_utils.py b/python/ray/dashboard/state_api_utils.py index 8ffafa7badb3..3eca573d36dc 100644 --- a/python/ray/dashboard/state_api_utils.py +++ b/python/ray/dashboard/state_api_utils.py @@ -44,6 +44,8 @@ async def handle_list_api( error_message="", result=asdict(result), ) + except ValueError as e: + return do_reply(success=False, error_message=str(e), result=None) except DataSourceUnavailable as e: return do_reply(success=False, error_message=str(e), result=None) @@ -70,7 +72,8 @@ def options_from_req(req: aiohttp.web.Request) -> ListApiOptions: if limit > RAY_MAX_LIMIT_FROM_API_SERVER: raise ValueError( f"Given limit {limit} exceeds the supported " - f"limit {RAY_MAX_LIMIT_FROM_API_SERVER}. Use a lower limit." + f"limit {RAY_MAX_LIMIT_FROM_API_SERVER}. Use a lower limit, " + f"or set the RAY_MAX_LIMIT_FROM_API_SERVER=limit" ) timeout = int(req.query.get("timeout", 30)) From cb924151939862249e1ba85684d05baf8a7cb1ce Mon Sep 17 00:00:00 2001 From: iamjustinhsu Date: Tue, 28 Oct 2025 14:36:11 -0700 Subject: [PATCH 2/2] gemini Signed-off-by: iamjustinhsu --- python/ray/dashboard/state_api_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/ray/dashboard/state_api_utils.py b/python/ray/dashboard/state_api_utils.py index 3eca573d36dc..30240d9aba10 100644 --- a/python/ray/dashboard/state_api_utils.py +++ b/python/ray/dashboard/state_api_utils.py @@ -72,8 +72,9 @@ def options_from_req(req: aiohttp.web.Request) -> ListApiOptions: if limit > RAY_MAX_LIMIT_FROM_API_SERVER: raise ValueError( f"Given limit {limit} exceeds the supported " - f"limit {RAY_MAX_LIMIT_FROM_API_SERVER}. Use a lower limit, " - f"or set the RAY_MAX_LIMIT_FROM_API_SERVER=limit" + f"Given limit {limit} exceeds the supported " + f"limit {RAY_MAX_LIMIT_FROM_API_SERVER}. Use a lower limit, or set the " + f"`RAY_MAX_LIMIT_FROM_API_SERVER` environment variable to a larger value." ) timeout = int(req.query.get("timeout", 30))