caddyserver/caddy · warning
path missing
Error message
path missing
What it means
Defensive check in unsyncedConfigAccess after splitting the trimmed path on '/': strings.Split never returns a zero-length slice for any input, so 'path missing' is effectively unreachable in practice. It exists purely as a guard against future changes to the trimming/splitting logic.
Source
Thrown at admin.go:1185
err = json.Unmarshal(body, &val)
if err != nil {
if jsonErr, ok := err.(*json.SyntaxError); ok {
return fmt.Errorf("decoding request body: %w, at offset %d", jsonErr, jsonErr.Offset)
}
return fmt.Errorf("decoding request body: %w", err)
}
}
enc := json.NewEncoder(out)
cleanPath := strings.Trim(path, "/")
if cleanPath == "" {
return fmt.Errorf("no traversable path")
}
parts := strings.Split(cleanPath, "/")
if len(parts) == 0 {
return fmt.Errorf("path missing")
}
// A path that ends with "..." implies:
// 1) the part before it is an array
// 2) the payload is an array
// and means that the user wants to expand the elements
// in the payload array and append each one into the
// destination array, like so:
// array = append(array, elems...)
// This special case is handled below.
ellipses := parts[len(parts)-1] == "..."
if ellipses {
parts = parts[:len(parts)-1]
}
var ptr any = rawCfg
traverseLoop:View on GitHub (pinned to 50e54ee279)
Solutions
- If you genuinely see this, verify you are running stock Caddy and not a patched build
- Report it upstream with the exact request that produced it
Defensive patterns
Strategy: fallback
Try / catch
If this impossible error appears, log the full request and check for a patched/non-standard build before debugging anything else.
Prevention
- Run stock releases of Caddy for admin API work
- Treat sightings as a code-integrity signal, not a usage error
When it happens
Trigger: Not reachable through any current code path: strings.Split on any string (including "") returns at least one element, and the empty case is already rejected by the 'no traversable path' check above.
Common situations: Should never appear. If it does, the file has been modified locally or a fork changed the split logic.
Related errors
- no traversable path
- unknown object ID '%s'
- decoding request body: %w, at offset %d
- decoding request body: %w
- [%s] invalid array index '%s': %v
AI-assisted analysis of caddyserver/caddy@50e54ee279 (2026-08-15).
Data as JSON: /api/errors/1d5c92bd15dea829.
Report an issue: GitHub.