{"record":{"id":"c9d78df66eaf63a3","repo":"denoland/deno","slug":"batchsize-must-be-a-positive-integer-received-b","errorCode":null,"errorMessage":"batchSize must be a positive integer: received ${batchSize}","messagePattern":"batchSize must be a positive integer: received (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"ext/kv/01_db.ts","lineNumber":250,"sourceCode":"      limit?: number;\n      batchSize?: number;\n      cursor?: string;\n      reverse?: boolean;\n      consistency?: Deno.KvConsistencyLevel;\n    } = { __proto__: null },\n  ): KvListIterator {\n    if (\n      options.limit !== undefined &&\n      (!NumberIsInteger(options.limit) || options.limit <= 0)\n    ) {\n      throw new Error(\n        `Limit must be a positive integer: received ${options.limit}`,\n      );\n    }\n\n    let batchSize = options.batchSize ?? (options.limit ?? 100);\n    if (!NumberIsInteger(batchSize) || batchSize <= 0) {\n      throw new Error(\n        `batchSize must be a positive integer: received ${batchSize}`,\n      );\n    }\n    if (options.batchSize === undefined && batchSize > 500) batchSize = 500;\n\n    return new KvListIterator({\n      limit: options.limit,\n      selector,\n      cursor: options.cursor,\n      reverse: options.reverse ?? false,\n      consistency: options.consistency ?? \"strong\",\n      batchSize,\n      pullBatch: this.#pullBatch(batchSize),\n    });\n  }\n\n  #pullBatch(batchSize: number): (\n    selector: Deno.KvListSelector,","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/denoland/deno/blob/89f33cbef296a2b287f323d42de54c871fa69c77/ext/kv/01_db.ts#L232-L268","documentation":"Error \"batchSize must be a positive integer: received ${batchSize}\" thrown in denoland/deno.","triggerScenarios":"Thrown at ext/kv/01_db.ts:250 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"89f33cbef296a2b287f323d42de54c871fa69c77","analyzedAt":"2026-08-16T07:54:21.310Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}