{"record":{"id":"6f7877f37f0ed3fa","repo":"denoland/deno","slug":"limit-must-be-a-positive-integer-received-optio","errorCode":null,"errorMessage":"Limit must be a positive integer: received ${options.limit}","messagePattern":"Limit must be a positive integer: received (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"ext/kv/01_db.ts","lineNumber":243,"sourceCode":"    );\n    if (!result) throw new TypeError(\"Failed to set value\");\n  }\n\n  list(\n    selector: Deno.KvListSelector,\n    options: {\n      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\",","sourceCodeStart":225,"sourceCodeEnd":261,"githubUrl":"https://github.com/denoland/deno/blob/89f33cbef296a2b287f323d42de54c871fa69c77/ext/kv/01_db.ts#L225-L261","documentation":"Error \"Limit must be a positive integer: received ${options.limit}\" thrown in denoland/deno.","triggerScenarios":"Thrown at ext/kv/01_db.ts:243 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"}