{"record":{"id":"515982e19d87ce30","repo":"weaviate/weaviate","slug":"limit-parameter-must-be-set","errorCode":null,"errorMessage":"limit parameter must be set","messagePattern":"limit parameter must be set","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"entities/filters/cursor_validator.go","lineNumber":46,"sourceCode":"\t\tvar params []string\n\t\tif offset > 0 {\n\t\t\tparams = append(params, \"offset\")\n\t\t}\n\t\tif filters != nil {\n\t\t\tparams = append(params, \"where\")\n\t\t}\n\t\tif sort != nil {\n\t\t\tparams = append(params, \"sort\")\n\t\t}\n\t\treturn fmt.Errorf(\"%s cannot be set with after and limit parameters\", strings.Join(params, \",\"))\n\t}\n\tif cursor.After != \"\" {\n\t\tif _, err := uuid.Parse(cursor.After); err != nil {\n\t\t\treturn errors.Wrapf(err, \"after parameter '%s' is not a valid uuid\", cursor.After)\n\t\t}\n\t}\n\tif cursor.Limit < 0 {\n\t\treturn fmt.Errorf(\"limit parameter must be set\")\n\t}\n\treturn nil\n}\n","sourceCodeStart":28,"sourceCodeEnd":50,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/entities/filters/cursor_validator.go#L28-L50","documentation":"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.","triggerScenarios":"Thrown at entities/filters/cursor_validator.go:46 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set an explicit limit >= 0 with the after cursor","Check the client serializer isn't omitting limit (zero-value handling)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"75aa4b6d11f8818305aafd4440b4e32794f7ca04","analyzedAt":"2026-09-04T14:58:20.392Z","contentChangedAt":"2026-09-04T14:58:20.392Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}