weaviate/weaviate · error

field 'path': %w

Error message

field 'path': %w

What it means

Wrapper for a failure from namespacing.QualifyRefTarget while qualifying an inner class segment of a cross-reference filter path on a namespaces-enabled (multi-tenant) cluster. Qualification resolves each odd-indexed path element (a referenced class name) against its parent's namespace for the requesting principal; failure means the class name cannot be resolved in that namespace context.

Source

Thrown at adapters/handlers/rest/filterext/parse.go:179

		return -1, fmt.Errorf("unrecognized operator: %s", in)
	}
}

func parsePath(in []string, rootClass string, namespacesEnabled bool, principal *models.Principal) (*filters.Path, error) {
	if len(in) == 0 {
		return nil, fmt.Errorf("field 'path': must have at least one element")
	}

	// Qualify each inner class segment (odd indices) against its parent's
	// namespace: rootClass for path[1], the qualified path[1] for path[3], etc.
	if namespacesEnabled && len(in) > 1 {
		qualified := make([]string, len(in))
		copy(qualified, in)
		parent := rootClass
		for i := 1; i < len(qualified); i += 2 {
			q, _, err := namespacing.QualifyRefTarget(principal, namespacesEnabled, parent, qualified[i])
			if err != nil {
				return nil, fmt.Errorf("field 'path': %w", err)
			}
			qualified[i] = q
			parent = q
		}
		in = qualified
	}

	pathElements := make([]interface{}, len(in))
	for i, elem := range in {
		pathElements[i] = elem
	}

	return filters.ParsePath(pathElements, rootClass)
}

func allValuesNil(in *models.WhereFilter) bool {
	return in.ValueBoolean == nil &&
		in.ValueDate == nil &&

View on GitHub (pinned to 75aa4b6d11)

Solutions

  1. Read the wrapped QualifyRefTarget error for the exact resolution failure
  2. Use the correct referenced class name that exists as a target of the reference property
  3. On multi-tenant clusters use the tenant-qualified class name in path segments
  4. Verify the principal's permissions/namespace cover the referenced class

Example fix

// before
{"path": ["inArticle", "Article", "title"], "operator": "Equal", "valueString": "x"}
// after (tenant-qualified referenced class)
{"path": ["inArticle", "Article|tenant-1", "title"], "operator": "Equal", "valueString": "x"}
Defensive patterns

Strategy: validation

Validate before calling

// On multi-tenant clusters, verify the referenced class resolves before querying
func validateRefPath(path []string, tenantClasses map[string]bool) error {
    for i := 1; i < len(path); i += 2 {
        if !tenantClasses[path[i]] {
            return fmt.Errorf("referenced class %q not in tenant namespace", path[i])
        }
    }
    return nil
}

Try / catch

_, err := client.GraphQL().Get().WithWhereFilter(f).Do(ctx)
if err != nil && strings.Contains(err.Error(), "field 'path'") {
    return fmt.Errorf("reference path class not resolvable in tenant namespace: %w", err)
}

Prevention

When it happens

Trigger: A multi-tenant where filter with a reference path like ["hasRef", "OtherClass", "name"] where OtherClass is not a valid/known target of hasRef in the principal's namespace, or the tenant/class combination fails qualification.

Common situations: Multi-tenant deployments where clients use bare class names in reference paths instead of the tenant-qualified form; renamed or deleted referenced collections; permission/namespace mismatches for the authenticated principal.

Related errors


AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04). Data as JSON: /api/errors/c74efc11b05ed780. Report an issue: GitHub.