mirror of https://github.com/status-im/consul.git
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.
This commit is contained in:
parent
9080bef4a4
commit
4e292b7b72
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue