{"record":{"id":"f0819c6669050d89","repo":"denoland/deno","slug":"invalid-mutation-delete-with-value","errorCode":null,"errorMessage":"Invalid mutation 'delete' with value","messagePattern":"Invalid mutation 'delete' with value","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"ext/kv/01_db.ts","lineNumber":485,"sourceCode":"    for (let i = 0; i < checks.length; ++i) {\n      const check = checks[i];\n      ArrayPrototypePush(this.#checks, [check.key, check.versionstamp]);\n    }\n    return this;\n  }\n\n  mutate(...mutations: Deno.KvMutation[]): this {\n    for (let i = 0; i < mutations.length; ++i) {\n      const mutation = mutations[i];\n      const key = mutation.key;\n      let type: string;\n      let value: RawValue | null;\n      let expireIn: number | undefined = undefined;\n      switch (mutation.type) {\n        case \"delete\":\n          type = \"delete\";\n          if (mutation.value) {\n            throw new TypeError(\"Invalid mutation 'delete' with value\");\n          }\n          break;\n        case \"set\":\n          if (typeof mutation.expireIn === \"number\") {\n            expireIn = mutation.expireIn;\n          }\n          validateExpireIn(expireIn);\n          /* falls through */\n        case \"sum\":\n        case \"min\":\n        case \"max\":\n          type = mutation.type;\n          if (!ObjectHasOwn(mutation, \"value\")) {\n            throw new TypeError(`Invalid mutation '${type}' without value`);\n          }\n          value = serializeValue(mutation.value);\n          break;\n        default:","sourceCodeStart":467,"sourceCodeEnd":503,"githubUrl":"https://github.com/denoland/deno/blob/89f33cbef296a2b287f323d42de54c871fa69c77/ext/kv/01_db.ts#L467-L503","documentation":"Error \"Invalid mutation 'delete' with value\" thrown in denoland/deno.","triggerScenarios":"Thrown at ext/kv/01_db.ts:485 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"}