From bfbc459c0afcb62bd73eb78472406ace1519790c Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Wed, 18 Aug 2021 15:32:35 -0600 Subject: [PATCH] httpcaddyfile: Improve unrecognized directive errors --- caddyconfig/httpcaddyfile/directives.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caddyconfig/httpcaddyfile/directives.go b/caddyconfig/httpcaddyfile/directives.go index 75fd473dc..800e8929e 100644 --- a/caddyconfig/httpcaddyfile/directives.go +++ b/caddyconfig/httpcaddyfile/directives.go @@ -329,7 +329,7 @@ func parseSegmentAsConfig(h Helper) ([]ConfigValue, error) { dir := seg.Directive() dirFunc, ok := registeredDirectives[dir] if !ok { - return nil, h.Errf("unrecognized directive: %s", dir) + return nil, h.Errf("unrecognized directive: %s - are you sure your Caddyfile structure (nesting and braces) is correct?", dir) } subHelper := h