diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index 8de720d52..c07ccf9ba 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -3079,7 +3079,7 @@ func (s *Service) Validate() error { serviceNameStripped := args.ReplaceEnvWithPlaceHolder(s.Name, "ENV-VAR") if err := s.ValidateName(serviceNameStripped); err != nil { - mErr.Errors = append(mErr.Errors, err) + mErr.Errors = append(mErr.Errors, fmt.Errorf("service name must be valid per RFC 1123 and can contain only alphanumeric characters or dashes: %q", s.Name)) } switch s.AddressMode {