vitessio/vitess · info
invalid /throttlerz path
Error message
invalid /throttlerz path
What it means
throttlerzHandler mirrors throttlerlogz: it splits the URL path into at most 3 '/'-separated segments and requires exactly 3 (/throttlerz/<name>). Fewer segments returns 404 'invalid /throttlerz path'. The bare /throttlerz path itself is registered separately as the list view; this handler expects a name.
Source
Thrown at go/vt/throttler/throttlerz.go:65
var (
listTemplate = template.Must(template.New("list").Parse(listHTML))
detailsTemplate = template.Must(template.New("details").Parse(detailsHTML))
)
func init() {
servenv.HTTPHandleFunc("/throttlerz/", func(w http.ResponseWriter, r *http.Request) {
throttlerzHandler(w, r, GlobalManager)
})
}
func throttlerzHandler(w http.ResponseWriter, r *http.Request, m *managerImpl) {
// Longest supported URL: /throttlerz/<name>
parts := strings.SplitN(r.URL.Path, "/", 3)
if len(parts) != 3 {
http.Error(w, "invalid /throttlerz path", http.StatusNotFound)
return
}
name := parts[2]
if name == "" {
listThrottlers(w, m)
return
}
if !slices.Contains(m.Throttlers(), name) {
http.Error(w, "throttler not found", http.StatusNotFound)
return
}
showThrottlerDetails(w, name)
}
func listThrottlers(w http.ResponseWriter, m *managerImpl) {View on GitHub (pinned to 01a25a7d17)
Solutions
- Use /throttlerz (exact) for the list view, or /throttlerz/<name> for details.
- Ensure exactly one slash separates 'throttlerz' and the name (avoid //throttlerz or /throttlerz//name).
- Check reverse-proxy rules for path rewriting that collapses slashes or strips the trailing segment.
- Update monitoring scripts to use the canonical URL shape.
Example fix
// before curl http://localhost:15000/throttlerzmy-throttler // after curl http://localhost:15000/throttlerz/my-throttler
Defensive patterns
Strategy: validation
Validate before calling
u, _ := url.Parse(base)
u.Path = path.Join("/throttlerz", name)
if name == "" {
u.Path = "/throttlerz"
}
req := u.String() Prevention
- Use path.Join to construct /throttlerz/<name> URLs; never concatenate.
- Distinguish the list view (/throttlerz) from the detail view (/throttlerz/<name>) in tooling.
- Verify proxy rewrite rules preserve single-slash path structure.
When it happens
Trigger: A request routed to throttlerzHandler with a path like '/throttlerz' (no trailing slash) yielding only 2 parts from strings.SplitN, or any path not shaped like /throttlerz/<name>.
Common situations: Scripts appending the throttler name without the separating slash or with a doubled/missing slash; proxies normalizing away the trailing slash; hand-written tests/monitoring checks hitting the wrong path shape.
Related errors
- invalid /throttlerlogz path
- no route variable found with name %s
- throttler not found
- err.Error()
- --enable and --disable are mutually exclusive
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/10e982c2f53fe5eb.
Report an issue: GitHub.