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

  1. Use /throttlerz (exact) for the list view, or /throttlerz/<name> for details.
  2. Ensure exactly one slash separates 'throttlerz' and the name (avoid //throttlerz or /throttlerz//name).
  3. Check reverse-proxy rules for path rewriting that collapses slashes or strips the trailing segment.
  4. 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

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


AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01). Data as JSON: /api/errors/10e982c2f53fe5eb. Report an issue: GitHub.