From e21e56c1ce9779d5297b7049c8995c7d543034f4 Mon Sep 17 00:00:00 2001 From: Ayush Patel Date: Mon, 16 Mar 2026 10:24:36 +0530 Subject: [PATCH] Refactor Error Message for Config Set --- .../configuration/_config_helper.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/workload-orchestration/azext_workload_orchestration/aaz/latest/workload_orchestration/configuration/_config_helper.py b/src/workload-orchestration/azext_workload_orchestration/aaz/latest/workload_orchestration/configuration/_config_helper.py index 9a478e6f949..31b15d3e8fb 100644 --- a/src/workload-orchestration/azext_workload_orchestration/aaz/latest/workload_orchestration/configuration/_config_helper.py +++ b/src/workload-orchestration/azext_workload_orchestration/aaz/latest/workload_orchestration/configuration/_config_helper.py @@ -115,7 +115,18 @@ def try_get_config_id(lookup_id, api_version = "2025-08-01"): # If we reach here, no configuration was found - raise CLIInternalError(f"No configuration linked to this hierarchy: {hierarchy_id_str}") + if "microsoft.edge/targets" in hierarchy_id_str.lower(): + raise CLIInternalError( + f"Missing target configuration and configuration reference for Target: {hierarchy_id_str}" + ) + elif "microsoft.edge/sites" in hierarchy_id_str.lower(): + raise CLIInternalError( + f"Missing site configuration and configuration reference for Site: {hierarchy_id_str}" + ) + else: + raise CLIInternalError( + f"Hierarchy Id can either be of Target or Site Resource. Invalid Id: {hierarchy_id_str}" + ) @staticmethod def getTemplateUniqueIdentifier(subscription_id, template_resource_group_name, template_name, solution_flag, client):