private static bool TryMatchConfigurationId()

in src/Azure.Deployments.Extensibility.Extensions.Kubernetes/KubernetesExtension.cs [165:185]


        private static bool TryMatchConfigurationId(string userSentConfigId, string expectedConfigId, [NotNullWhen(false)] out IResult? errorResult)
        {
            errorResult = null;

            if (string.Equals(expectedConfigId, userSentConfigId, StringComparison.Ordinal))
            {
                return true;
            }

            errorResult = Results.UnprocessableEntity(
                new ErrorData
                {
                    Error = new()
                    {
                        Code = "ClusterMismatch",
                        Message = "The referenced Kubernetes object cannot be deleted because it may be deployed to a different cluster. Please verify that you are using the correct kubeConfig file and context.",
                    },
                });

            return false;
        }