weaviate/weaviate · error
parse params: %w
Error message
parse params: %w
What it means
The gRPC Aggregate endpoint failed to translate the incoming protobuf aggregation request into the internal aggregation params structure. parser.Aggregate() validates the request (collection existence, aggregations shape, group-by, filters, tenant resolution) and returns an error, which is wrapped here so callers can see it came from parameter parsing before any traversal ran.
Source
Thrown at adapters/handlers/grpc/v1/service.go:119
return nil, fmt.Errorf("extract auth: %w", err)
}
defer func() { retErr = namespacing.StripErrForPrincipal(principal, retErr) }()
ctx = restCtx.AddPrincipalToContext(ctx, principal)
if req.Collection, _, err = namespacing.Resolve(principal, s.schemaManager, s.config.Namespaces.Enabled, req.Collection); err != nil {
return nil, err
}
getClass := s.classGetterWithAuthzFunc(ctx, principal, req.Tenant)
parser := NewAggregateParser(
getClass,
s.config.Namespaces.Enabled,
principal,
)
params, err := parser.Aggregate(req)
if err != nil {
return nil, fmt.Errorf("parse params: %w", err)
}
res, err := s.traverser.Aggregate(restCtx.AddPrincipalToContext(ctx, principal), principal, params)
if err != nil {
return nil, fmt.Errorf("aggregate: %w", err)
}
replier := NewAggregateReplier(
principal,
getClass,
params,
)
reply, err = replier.Aggregate(res, params.GroupBy != nil)
if err != nil {
return nil, fmt.Errorf("prepare reply: %w", err)
}
reply.Took = float32(time.Since(before).Seconds())View on GitHub (pinned to 75aa4b6d11)
Solutions
- Check the error's wrapped cause for the exact field rejected by the parser
- Verify the collection name (including tenant/namespace prefix) exists and the principal can read it
- Confirm each aggregation targets an existing property of the correct data type (numeric aggregations only on int/number)
- Regenerate client stubs if the proto schema version differs from the server
Example fix
// before: aggregating price (string) with mean
agg := &pb.Aggregate{ Collection: "Product", Properties: []*pb.AggregateProperty{{PropertyName: "price", NumericalAggregations: ...}} }
// after: use count on non-numeric props, or fix schema type
agg := &pb.Aggregate{ Collection: "Product", Properties: []*pb.AggregateProperty{{PropertyName: "price", Aggregations: []pb.Aggregation{{Type: pb.Aggregation_TYPE_COUNT}}}} } Defensive patterns
Strategy: validation
Validate before calling
func validateAggregateReq(req *pb.AggregateRequest) error {
if req == nil || req.Collection == "" { return errors.New("collection required") }
for _, p := range req.Properties {
if p.PropertyName == "" { return errors.New("property name required") }
}
return nil
} Type guard
func validAggProp(p *pb.AggregateProperty) bool { return p != nil && p.PropertyName != "" } Try / catch
res, err := client.Aggregate(ctx, req)
if err != nil && strings.Contains(err.Error(), "parse params") {
return fmt.Errorf("invalid aggregation request: %w", err)
} Prevention
- Validate collection and property names against the schema before calling
- Only use numeric aggregations on int/number properties
- Regenerate stubs when upgrading the server proto
When it happens
Trigger: Calling the gRPC Aggregate RPC with an invalid collection name, an aggregation spec the parser rejects (bad property, unsupported aggregation on a reference/none-string property without count, invalid groupBy path, unresolvable namespace/tenant), or a filter that fails validation.
Common situations: Client built the request against an outdated proto schema; typo'd property or collection names; aggregating a non-numeric property with a numeric aggregation; requesting groupBy on a field that cannot be grouped; namespace feature enabled but request uses raw collection name that needs namespacing resolution.
Related errors
- extract filters: %w
- validate filters: %w
- extract target vectors: %w
- found more than one target vector for aggregation
- parse near vector: %w
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/3ff49f85e21e51ce.
Report an issue: GitHub.