diff --git a/agent/config/builder.go b/agent/config/builder.go index d0a3a353de..c3fa42d1a4 100644 --- a/agent/config/builder.go +++ b/agent/config/builder.go @@ -999,7 +999,7 @@ func (b *Builder) serviceVal(v *ServiceDefinition) *structs.ServiceDefinition { meta := make(map[string]string) if err := structs.ValidateMetadata(v.Meta, false); err != nil { - b.err = multierror.Append(fmt.Errorf("invalid meta for service %s: %v", *v.Name, err)) + b.err = multierror.Append(fmt.Errorf("invalid meta for service %s: %v", b.stringVal(v.Name), err)) } else { meta = v.Meta }