fix: use descriptive error for unknown block options in health and log plugins (#8128)

This commit is contained in:
Immanuel Tikhonov
2026-05-28 03:29:24 +04:00
committed by GitHub
parent afdf121a5a
commit 0bcb17df06
4 changed files with 29 additions and 12 deletions

View File

@@ -86,7 +86,7 @@ func logParse(c *caddy.Controller) ([]Rule, error) {
classes[cls] = struct{}{}
}
default:
return nil, c.ArgErr()
return nil, c.Errf("unknown property '%s'", c.Val())
}
}
if len(classes) == 0 {