{"record":{"id":"91e2f7a337fe04bf","repo":"denoland/deno","slug":"failed-to-enqueue-value","errorCode":null,"errorMessage":"Failed to enqueue value","messagePattern":"Failed to enqueue value","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"ext/kv/01_db.ts","lineNumber":319,"sourceCode":"    }\n    if (opts?.backoffSchedule !== undefined) {\n      validateBackoffSchedule(opts?.backoffSchedule);\n    }\n\n    const versionstamp = await doAtomicWriteInPlace(\n      this.#rid,\n      [],\n      [],\n      [\n        [\n          core.serialize(message, { forStorage: true }),\n          opts?.delay ?? 0,\n          opts?.keysIfUndelivered ?? [],\n          opts?.backoffSchedule ?? null,\n        ],\n      ],\n    );\n    if (versionstamp === null) throw new TypeError(\"Failed to enqueue value\");\n    return { ok: true, versionstamp };\n  }\n\n  async listenQueue(\n    handler: (message: unknown) => Promise<void> | void,\n  ): Promise<void> {\n    if (this.#isClosed) {\n      throw new Error(\"Queue already closed\");\n    }\n    const finishMessageOps = new SafeMap<number, Promise<void>>();\n    while (true) {\n      // Wait for the next message.\n      const next: { 0: Uint8Array; 1: number } =\n        await op_kv_dequeue_next_message(\n          this.#rid,\n        );\n      if (next === null) {\n        break;","sourceCodeStart":301,"sourceCodeEnd":337,"githubUrl":"https://github.com/denoland/deno/blob/89f33cbef296a2b287f323d42de54c871fa69c77/ext/kv/01_db.ts#L301-L337","documentation":"Error \"Failed to enqueue value\" thrown in denoland/deno.","triggerScenarios":"Thrown at ext/kv/01_db.ts:319 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"}