diff --git a/sky/backends/backend_utils.py b/sky/backends/backend_utils.py index 2521fcbcfe5..caa6c9292d5 100644 --- a/sky/backends/backend_utils.py +++ b/sky/backends/backend_utils.py @@ -2772,6 +2772,10 @@ def get_endpoints(cluster: str, cluster_records = get_clusters(include_controller=True, refresh=False, cluster_names=[cluster]) + if not cluster_records: + with ux_utils.print_exception_no_traceback(): + raise exceptions.ClusterNotUpError( + f'Cluster {cluster!r} not found.', cluster_status=None) assert len(cluster_records) == 1, cluster_records cluster_record = cluster_records[0] if (not skip_status_check and