weaviate/weaviate · error

limit parameter must be set

Error message

limit parameter must be set

What it means

A cursor pagination request supplied an after cursor but a negative (i.e. unset/invalid) limit. The guard checks cursor.Limit after the cursor-compatibility checks; the client must send an explicit non-negative limit.

Source

Thrown at entities/filters/cursor_validator.go:46

		var params []string
		if offset > 0 {
			params = append(params, "offset")
		}
		if filters != nil {
			params = append(params, "where")
		}
		if sort != nil {
			params = append(params, "sort")
		}
		return fmt.Errorf("%s cannot be set with after and limit parameters", strings.Join(params, ","))
	}
	if cursor.After != "" {
		if _, err := uuid.Parse(cursor.After); err != nil {
			return errors.Wrapf(err, "after parameter '%s' is not a valid uuid", cursor.After)
		}
	}
	if cursor.Limit < 0 {
		return fmt.Errorf("limit parameter must be set")
	}
	return nil
}

View on GitHub (pinned to 75aa4b6d11)

Solutions

  1. Set an explicit limit >= 0 with the after cursor
  2. Check the client serializer isn't omitting limit (zero-value handling)
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at entities/filters/cursor_validator.go:46 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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