{"record":{"id":"00607af028a60c9b","repo":"denoland/deno","slug":"value-must-be-a-positive-bigint-received-value","errorCode":null,"errorMessage":"Value must be a positive bigint: received ${value}","messagePattern":"Value must be a positive bigint: received (.+?)","errorType":"exception","errorClass":"RangeError","httpStatus":null,"severity":"error","filePath":"ext/kv/01_db.ts","lineNumber":735,"sourceCode":"      return \"AtomicOperation (empty)\";\n    }\n\n    return `AtomicOperation\\n${ArrayPrototypeJoin(operations, \"\\n\")}`;\n  }\n}\n\nconst MIN_U64 = BigInt(\"0\");\nconst MAX_U64 = BigInt(\"0xffffffffffffffff\");\n\nclass KvU64 {\n  value: bigint;\n\n  constructor(value: bigint) {\n    if (typeof value !== \"bigint\") {\n      throw new TypeError(`Value must be a bigint: received ${typeof value}`);\n    }\n    if (value < MIN_U64) {\n      throw new RangeError(\n        `Value must be a positive bigint: received ${value}`,\n      );\n    }\n    if (value > MAX_U64) {\n      throw new RangeError(\"Value must fit in a 64-bit unsigned integer\");\n    }\n    this.value = value;\n    ObjectFreeze(this);\n  }\n\n  valueOf() {\n    return this.value;\n  }\n\n  toString() {\n    return BigIntPrototypeToString(this.value);\n  }\n","sourceCodeStart":717,"sourceCodeEnd":753,"githubUrl":"https://github.com/denoland/deno/blob/89f33cbef296a2b287f323d42de54c871fa69c77/ext/kv/01_db.ts#L717-L753","documentation":"Error \"Value must be a positive bigint: received ${value}\" thrown in denoland/deno.","triggerScenarios":"Thrown at ext/kv/01_db.ts:735 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"}