From d6c7319b477ead767f42e8edaa8f7d66e0dc0517 Mon Sep 17 00:00:00 2001 From: mahdikhashan Date: Mon, 27 Jan 2025 21:06:42 +0100 Subject: [PATCH] improve value error message Signed-off-by: mahdikhashan --- sdk/python/v1beta1/kubeflow/katib/api/katib_client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk/python/v1beta1/kubeflow/katib/api/katib_client.py b/sdk/python/v1beta1/kubeflow/katib/api/katib_client.py index 97b58576cb0..f9573473bcd 100644 --- a/sdk/python/v1beta1/kubeflow/katib/api/katib_client.py +++ b/sdk/python/v1beta1/kubeflow/katib/api/katib_client.py @@ -571,7 +571,9 @@ class name in this argument. except Exception as e: if hasattr(e, "status") and e.status == 422: raise ValueError( - f"An Experiment with the name {name} is not valid." + f"The Experiment name '{name}' is invalid. It must use only lowercase " + f"alphanumeric characters ('a-z', '0-9'), hyphens ('-'), or periods ('.'). " + f"It must also start and end with an alphanumeric character." ) pvc_list = self.core_api.list_namespaced_persistent_volume_claim(