From 4e292b7b7242348162bd3de7fd605c62b9b3dbbc Mon Sep 17 00:00:00 2001 From: cskh Date: Wed, 27 Jul 2022 10:16:46 -0400 Subject: [PATCH] chore: clarify the error message: service.service must not be empty (#13907) - when register service using catalog endpoint, the key of service name actually should be "service". Add this information to the error message will help user to quickly fix in the request. --- agent/consul/catalog_endpoint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/consul/catalog_endpoint.go b/agent/consul/catalog_endpoint.go index 6508ba220b..5ab8fb12dd 100644 --- a/agent/consul/catalog_endpoint.go +++ b/agent/consul/catalog_endpoint.go @@ -176,7 +176,7 @@ func servicePreApply(service *structs.NodeService, authz resolver.Result, authzC // Verify ServiceName provided if ID. if service.ID != "" && service.Service == "" { - return fmt.Errorf("Must provide service name with ID") + return fmt.Errorf("Must provide service name (Service.Service) when service ID is provided") } // Check the service address here and in the agent endpoint