{"record":{"id":"8344a658eadd1d70","repo":"denoland/deno","slug":"failed-to-set-value","errorCode":null,"errorMessage":"Failed to set value","messagePattern":"Failed to set value","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"ext/kv/01_db.ts","lineNumber":215,"sourceCode":"        return {\n          key: keys[i],\n          value: null,\n          versionstamp: null,\n        };\n      }\n      return deserializeValue(entries[0]);\n    });\n  }\n\n  async set(key: Deno.KvKey, value: unknown, options?: { expireIn?: number }) {\n    validateExpireIn(options?.expireIn);\n    const versionstamp = await doAtomicWriteInPlace(\n      this.#rid,\n      [],\n      [[key, \"set\", serializeValue(value), options?.expireIn]],\n      [],\n    );\n    if (versionstamp === null) throw new TypeError(\"Failed to set value\");\n    return { ok: true, versionstamp };\n  }\n\n  async delete(key: Deno.KvKey) {\n    const result = await doAtomicWriteInPlace(\n      this.#rid,\n      [],\n      [[key, \"delete\", null, undefined]],\n      [],\n    );\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;","sourceCodeStart":197,"sourceCodeEnd":233,"githubUrl":"https://github.com/denoland/deno/blob/89f33cbef296a2b287f323d42de54c871fa69c77/ext/kv/01_db.ts#L197-L233","documentation":"Error \"Failed to set value\" thrown in denoland/deno.","triggerScenarios":"Thrown at ext/kv/01_db.ts:215 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"}